e83cdd
From 90054e4f1f2f64cb9a2b06b44b5a82b293c387dd Mon Sep 17 00:00:00 2001
e83cdd
From: Lukas Nykryn <lnykryn@redhat.com>
e83cdd
Date: Thu, 10 Jan 2019 18:08:32 +0100
e83cdd
Subject: [PATCH] 95iscsi: decouple iscsi from sysinit.target
e83cdd
e83cdd
---
e83cdd
 modules.d/95iscsi/module-setup.sh | 17 +++++++++++++++++
e83cdd
 1 file changed, 17 insertions(+)
e83cdd
e83cdd
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
e83cdd
index 5c2073bb..ae1924cc 100755
e83cdd
--- a/modules.d/95iscsi/module-setup.sh
e83cdd
+++ b/modules.d/95iscsi/module-setup.sh
e83cdd
@@ -265,6 +265,23 @@ install() {
e83cdd
             echo "After=dracut-cmdline.service"
e83cdd
             echo "Before=dracut-initqueue.service"
e83cdd
         ) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
e83cdd
+
e83cdd
+        # The iscsi deamon does not need to wait for any storage inside initrd
e83cdd
+        mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.socket.d"
e83cdd
+        (
e83cdd
+            echo "[Unit]"
e83cdd
+            echo "DefaultDependencies=no"
e83cdd
+            echo "Conflicts=shutdown.target"
e83cdd
+            echo "Before=shutdown.target sockets.target"
e83cdd
+        ) > "${initdir}/$systemdsystemunitdir/iscsid.socket.d/dracut.conf"
e83cdd
+        mkdir -p "${initdir}/$systemdsystemunitdir/iscsuio.socket.d"
e83cdd
+        (
e83cdd
+            echo "[Unit]"
e83cdd
+            echo "DefaultDependencies=no"
e83cdd
+            echo "Conflicts=shutdown.target"
e83cdd
+            echo "Before=shutdown.target sockets.target"
e83cdd
+        ) > "${initdir}/$systemdsystemunitdir/iscsuio.socket.d/dracut.conf"
e83cdd
+
e83cdd
     fi
e83cdd
     inst_dir /var/lib/iscsi
e83cdd
     dracut_need_initqueue
e83cdd