]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
base/dracut-lib.sh:wait_for_dev() relax requirement
authorHarald Hoyer <harald@redhat.com>
Mon, 2 Dec 2013 09:39:36 +0000 (10:39 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 3 Dec 2013 15:21:04 +0000 (16:21 +0100)
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

index 0670cf2eb053900bba53d6fb4338f3369f13461c..970bcfbcb11e28bcc77f2fc83d48cc4704958c8c 100755 (executable)
@@ -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