iscsi-initiator-utils/open-iscsi-v2.0.873-4c9d6f9-17-update-iscsi.service-for-boot-session-recovery.patch
Chris Leech 2abe1f9093 upstream sync, use external isns-utils package
build with external isns-utils
rebase with upstream, change Source0 url to github
2015-10-05 17:27:51 -07:00

35 lines
1.1 KiB
Diff

From 83e75cc234306e699067303bf573c41b4454ae87 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
--
2.1.0