Skip to content

Commit

Permalink
Merge pull request #307 from aafeijoo-suse/059-upstream-fixes-9-microos
Browse files Browse the repository at this point in the history
fix(dracut.sh): do not add device if `find_block_device` returns an error
  • Loading branch information
aafeijoo-suse authored Dec 21, 2023
2 parents ba7b6a3 + 0cf16a9 commit 5a7cf9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ long_version() {
push_host_devs() {
local _dev
for _dev in "$@"; do
[[ -z $_dev ]] && continue
[[ " ${host_devs[*]} " == *" $_dev "* ]] && return
host_devs+=("$_dev")
done
Expand Down Expand Up @@ -1657,7 +1658,7 @@ if [[ $hostonly ]] && [[ $hostonly_default_device != "no" ]]; then
"/boot/zipl"; do
mp=$(readlink -f "$dracutsysrootdir$mp")
mountpoint "$mp" > /dev/null 2>&1 || continue
_dev=$(find_block_device "$mp")
_dev=$(find_block_device "$mp") || continue
_bdev=$(readlink -f "/dev/block/$_dev")
[[ -b $_bdev ]] && _dev=$_bdev
[[ $mp == "/" ]] && root_devs+=("$_dev")
Expand Down

0 comments on commit 5a7cf9f

Please sign in to comment.