Blob Blame History Raw
From 969e26197c792ec5377d2c261a934a9c907e82f0 Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Fri, 14 Mar 2014 09:22:21 -0700
Subject: [PATCH] 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
 
-- 
1.8.3.1