Blame 0019-make-session-shutdown-a-seperate-service.patch.patch

7c06f4
From 24e4c97887d28d8adfa80c990571633e9baa1c7b Mon Sep 17 00:00:00 2001
278948
From: rpm-build <rpm-build>
278948
Date: Tue, 13 Jan 2015 16:30:01 -0800
7c06f4
Subject: [PATCH 19/22] make-session-shutdown-a-seperate-service.patch
278948
278948
---
278948
 etc/systemd/iscsi-shutdown.service | 14 ++++++++++++++
278948
 etc/systemd/iscsi.service          |  3 +--
278948
 2 files changed, 15 insertions(+), 2 deletions(-)
278948
 create mode 100644 etc/systemd/iscsi-shutdown.service
278948
278948
diff --git a/etc/systemd/iscsi-shutdown.service b/etc/systemd/iscsi-shutdown.service
278948
new file mode 100644
278948
index 0000000..23758e9
278948
--- /dev/null
278948
+++ b/etc/systemd/iscsi-shutdown.service
278948
@@ -0,0 +1,14 @@
278948
+[Unit]
278948
+Description=Logout off all iSCSI sessions on shutdown
278948
+Documentation=man:iscsid(8) man:iscsiadm(8)
278948
+DefaultDependencies=no
278948
+Conflicts=shutdown.target
278948
+After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
278948
+Before=remote-fs-pre.target
278948
+Wants=remote-fs-pre.target
278948
+RefuseManualStop=yes
278948
+
278948
+[Service]
278948
+Type=oneshot
278948
+RemainAfterExit=true
278948
+ExecStop=-/sbin/iscsiadm -m node --logoutall=all
278948
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
278948
index ad7be34..2736956 100644
278948
--- a/etc/systemd/iscsi.service
278948
+++ b/etc/systemd/iscsi.service
278948
@@ -5,7 +5,7 @@ DefaultDependencies=no
278948
 Conflicts=shutdown.target
278948
 After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
278948
 Before=remote-fs-pre.target
278948
-Wants=remote-fs-pre.target
278948
+Wants=remote-fs-pre.target iscsi-shutdown.service
278948
 ConditionDirectoryNotEmpty=|/var/lib/iscsi/nodes
278948
 ConditionDirectoryNotEmpty=|/sys/class/iscsi_session
278948
 
278948
@@ -14,7 +14,6 @@ Type=oneshot
278948
 RemainAfterExit=true
278948
 ExecStart=-/usr/libexec/iscsi-mark-root-nodes
278948
 ExecStart=-/sbin/iscsiadm -m node --loginall=automatic
278948
-ExecStop=-/sbin/iscsiadm -m node --logoutall=automatic
278948
 ExecReload=-/sbin/iscsiadm -m node --loginall=automatic
278948
 
278948
 [Install]
278948
-- 
7c06f4
2.9.3
278948