From 151329c9d97aac24098d1f23ffc9db91499402ac 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 74d7d35..7249c58 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -856,9 +856,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 @@ -878,7 +878,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