diff --git a/dracut.sh b/dracut.sh index 6215b360..ec48015f 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1223,7 +1223,9 @@ if [[ $hostonly ]]; then done < /etc/crypttab fi - push_host_devs "$(readlink -f "$dev")" + _dev="$(readlink -f "$dev")" + push_host_devs "$_dev" + push swap_devs "$_dev" break done < /etc/fstab done < /proc/swaps @@ -1334,7 +1336,7 @@ export initdir dracutbasedir \ omit_drivers mdadmconf lvmconf root_dev \ use_fstab fstab_lines libdirs fscks nofscks ro_mnt \ stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \ - debug host_fs_types host_devs sshkey add_fstab \ + debug host_fs_types host_devs swap_devs sshkey add_fstab \ DRACUT_VERSION udevdir prefix filesystems drivers \ systemdutildir systemdsystemunitdir systemdsystemconfdir \ host_modalias host_modules hostonly_cmdline loginstall \ diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh index fd65cdf6..bbc68ba1 100755 --- a/modules.d/99base/module-setup.sh +++ b/modules.d/99base/module-setup.sh @@ -103,6 +103,14 @@ install() { for _dev in ${host_devs[@]}; do [[ "$_dev" == "$root_dev" ]] && continue + + # We only actually wait for real devs - swap is only needed + # for resume and udev rules generated when parsing resume= + # argument take care of the waiting for us + for _dev2 in ${swap_devs[@]}; do + [[ "$_dev" == "$_dev2" ]] && continue 2 + done + _pdev=$(get_persistent_dev $_dev) case "$_pdev" in