-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dracut.sh): do not add device if find_block_device
returns an error
#2593
base: master
Are you sure you want to change the base?
Conversation
…rror If `find_block_device` returns an error, the device must not be added to the list of host devices. E.g., a system with /etc mounted as overlay is pushing the empty string '' as host device. ``` //usr/bin/dracut@1658(): readlink -f /etc /usr/bin/dracut@1658(): mp=/etc /usr/bin/dracut@1659(): mountpoint /etc //usr/bin/dracut@1660(): find_block_device /etc //usr/lib/dracut/dracut-functions.sh@366(find_block_device): local _dev _majmin _find_mpt //usr/lib/dracut/dracut-functions.sh@367(find_block_device): _find_mpt=/etc //usr/lib/dracut/dracut-functions.sh@369(find_block_device): [[ '' != yes ]] //usr/lib/dracut/dracut-functions.sh@370(find_block_device): [[ -d /etc/. ]] //usr/lib/dracut/dracut-functions.sh@371(find_block_device): findmnt -e -v -n -o MAJ:MIN,SOURCE --target /etc //usr/lib/dracut/dracut-functions.sh@372(find_block_device): read -r _majmin _dev //usr/lib/dracut/dracut-functions.sh@373(find_block_device): [[ -b overlay ]] //usr/lib/dracut/dracut-functions.sh@384(find_block_device): [[ overlay == *:* ]] //usr/lib/dracut/dracut-functions.sh@372(find_block_device): read -r _majmin _dev //usr/lib/dracut/dracut-functions.sh@372(find_block_device): '[' -n '' ']' //usr/lib/dracut/dracut-functions.sh@389(find_block_device): return 1 //usr/lib/dracut/dracut-functions.sh@393(find_block_device): [[ ! -f /etc/fstab ]] //usr/lib/dracut/dracut-functions.sh@395(find_block_device): findmnt -e --fstab -v -n -o MAJ:MIN,SOURCE --target /etc //usr/lib/dracut/dracut-functions.sh@396(find_block_device): read -r _majmin _dev //usr/lib/dracut/dracut-functions.sh@397(find_block_device): [[ -n '' ]] //usr/lib/dracut/dracut-functions.sh@398(find_block_device): _dev=overlay //usr/lib/dracut/dracut-functions.sh@399(find_block_device): unset _majmin //usr/lib/dracut/dracut-functions.sh@401(find_block_device): [[ -b overlay ]] //usr/lib/dracut/dracut-functions.sh@410(find_block_device): [[ overlay == *:* ]] //usr/lib/dracut/dracut-functions.sh@396(find_block_device): read -r _majmin _dev //usr/lib/dracut/dracut-functions.sh@396(find_block_device): '[' -n '' ']' //usr/lib/dracut/dracut-functions.sh@415(find_block_device): return 1 //usr/lib/dracut/dracut-functions.sh@418(find_block_device): return 1 /usr/bin/dracut@1660(): _dev= //usr/bin/dracut@1661(): readlink -f /dev/block/ /usr/bin/dracut@1661(): _bdev=/dev/block /usr/bin/dracut@1662(): [[ -b /dev/block ]] /usr/bin/dracut@1663(): [[ /etc == \/ ]] /usr/bin/dracut@1664(): push_host_devs '' ``` Fixes dracutdevs#2592
Check at least that the arguments are not an empty string.
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions. |
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions. |
If
find_block_device
returns an error, the device must not be added to the list of host devices. E.g., a system with /etc mounted as overlay is pushing the empty string '' as host device.Checklist
Fixes #2592