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