From b92896ece49d27741f41e915c4673bde2a9bcb1f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 2 Dec 2013 10:39:36 +0100 Subject: [PATCH] base/dracut-lib.sh:wait_for_dev() relax requirement Do not "require" the devices, but "want" them. This might boot more systems, where: - the UUID changed - swap devices do not show up --- modules.d/99base/dracut-lib.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 0670cf2..970bcfb 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -863,9 +863,9 @@ wait_for_dev() if [ -n "$DRACUT_SYSTEMD" ]; then _name=$(dev_unit_name "$1") - if ! [ -L ${PREFIX}/etc/systemd/system/initrd.target.requires/${_name}.device ]; then - [ -d ${PREFIX}/etc/systemd/system/initrd.target.requires ] || mkdir -p ${PREFIX}/etc/systemd/system/initrd.target.requires - ln -s ../${_name}.device ${PREFIX}/etc/systemd/system/initrd.target.requires/${_name}.device + if ! [ -L ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device ]; then + [ -d ${PREFIX}/etc/systemd/system/initrd.target.wants ] || mkdir -p ${PREFIX}/etc/systemd/system/initrd.target.wants + ln -s ../${_name}.device ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device fi mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d @@ -885,7 +885,7 @@ cancel_wait_for_dev() rm -f -- "$hookdir/emergency/80-${_name}.sh" if [ -n "$DRACUT_SYSTEMD" ]; then _name=$(dev_unit_name "$1") - rm -f -- ${PREFIX}/etc/systemd/system/initrd.target.requires/${_name}.device + rm -f -- ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device rm -f -- ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload fi