54e364e33d
minimal packaging for libopeniscsiusr
76 lines
2.3 KiB
Diff
76 lines
2.3 KiB
Diff
From 5dd8fc7d27204a3461b33defed1e0bb4331c7663 Mon Sep 17 00:00:00 2001
|
|
From: Chris Leech <cleech@redhat.com>
|
|
Date: Mon, 19 Aug 2013 07:18:25 -0700
|
|
Subject: [PATCH 05/32] iscsi boot related service file updates
|
|
|
|
make sure iscsid gets started if there are any boot sessions running
|
|
add reload target to fix double session problem when restarting from NM
|
|
don't rely on session list passed from initrd, never got fully implemented
|
|
---
|
|
etc/systemd/iscsi-mark-root-nodes | 13 +++++++++++++
|
|
etc/systemd/iscsi.service | 3 ++-
|
|
etc/systemd/iscsi_mark_root_nodes | 14 --------------
|
|
3 files changed, 15 insertions(+), 15 deletions(-)
|
|
create mode 100644 etc/systemd/iscsi-mark-root-nodes
|
|
delete mode 100755 etc/systemd/iscsi_mark_root_nodes
|
|
|
|
diff --git a/etc/systemd/iscsi-mark-root-nodes b/etc/systemd/iscsi-mark-root-nodes
|
|
new file mode 100644
|
|
index 000000000000..157be62b4041
|
|
--- /dev/null
|
|
+++ b/etc/systemd/iscsi-mark-root-nodes
|
|
@@ -0,0 +1,13 @@
|
|
+#!/bin/bash
|
|
+
|
|
+ISCSIADM=/sbin/iscsiadm
|
|
+
|
|
+$ISCSIADM -m session >/dev/null 2>&1 || exit 0
|
|
+
|
|
+$ISCSIADM -m session | while read t num i target; do
|
|
+ ip=${i%:*}
|
|
+ $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot
|
|
+done
|
|
+
|
|
+systemctl start iscsid.service
|
|
+
|
|
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
|
|
index bbd52fd66890..0309e2fc9892 100644
|
|
--- a/etc/systemd/iscsi.service
|
|
+++ b/etc/systemd/iscsi.service
|
|
@@ -10,10 +10,11 @@ ConditionPathExists=/etc/iscsi/initiatorname.iscsi
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=true
|
|
-ExecStart=/usr/libexec/iscsi_mark_root_nodes
|
|
+ExecStart=/usr/libexec/iscsi-mark-root-nodes
|
|
ExecStart=/sbin/iscsiadm -m node --loginall=automatic
|
|
ExecStop=/bin/sync
|
|
ExecStop=/sbin/iscsiadm -m node --logoutall=automatic
|
|
+ExecReload=/sbin/iscsiadm -m node --loginall=automatic
|
|
|
|
[Install]
|
|
WantedBy=sysinit.target
|
|
diff --git a/etc/systemd/iscsi_mark_root_nodes b/etc/systemd/iscsi_mark_root_nodes
|
|
deleted file mode 100755
|
|
index c68475c44de5..000000000000
|
|
--- a/etc/systemd/iscsi_mark_root_nodes
|
|
+++ /dev/null
|
|
@@ -1,14 +0,0 @@
|
|
-#!/bin/bash
|
|
-
|
|
-ISCSIADM=/sbin/iscsiadm
|
|
-SESSION_FILE=/run/initramfs/iscsi.sessions
|
|
-
|
|
-if [ ! -f $SESSION_FILE ] ; then
|
|
- exit 0
|
|
-fi
|
|
-
|
|
-while read t num i target; do
|
|
- ip=${i%:*}
|
|
- $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot
|
|
-done < $SESSION_FILE
|
|
-
|
|
--
|
|
2.14.4
|
|
|