Blob Blame Raw
From e032f33bcb166bb3a47b580192e8856765a26503 Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Fri, 14 Mar 2014 09:22:21 -0700
Subject: [PATCH 17/22] update iscsi.service for boot session recovery

---
 etc/systemd/iscsi.service | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
index d5712bd..3de76c5 100644
--- a/etc/systemd/iscsi.service
+++ b/etc/systemd/iscsi.service
@@ -5,14 +5,15 @@ DefaultDependencies=no
 Conflicts=shutdown.target
 After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
 Before=remote-fs-pre.target
-ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes
+ConditionDirectoryNotEmpty=|/var/lib/iscsi/nodes
+ConditionDirectoryNotEmpty=|/sys/class/iscsi_session
 
 [Service]
 Type=oneshot
 RemainAfterExit=true
 ExecStart=/usr/libexec/iscsi-mark-root-nodes
+SuccessExitStatus=21
 ExecStart=/sbin/iscsiadm -m node --loginall=automatic
-ExecStop=/bin/sync
 ExecStop=/sbin/iscsiadm -m node --logoutall=automatic
 ExecReload=/sbin/iscsiadm -m node --loginall=automatic
 
-- 
2.9.3