Blame SOURCES/0050-base-dracut-lib.sh-wait_for_dev-relax-requirement.patch

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