c055794
From 3770c9a12d85bd4a990430faa7889b7692d5c6ac Mon Sep 17 00:00:00 2001
c055794
From: Chris Leech <cleech@redhat.com>
c055794
Date: Thu, 18 Feb 2021 14:04:32 -0800
c055794
Subject: [PATCH 1/1] minor service file updates
c055794
c055794
Intended use is with system presets to enable the following:
c055794
  iscsi.service - login of automatic node records
c055794
  iscsid.socket - start iscsid as needed for all iSCSI sessions
c055794
  iscsiuio.socket - start iscsiuio as needed for bnx2i or qedi
c055794
  iscsi-onboot.service - special handling of initramfs sessions
c055794
c055794
The following are started automatically as needed:
c055794
  iscsid.service - needed for all iSCSI sessions
c055794
  iscsiuio.service - needed for bnx2i or qedi offload
c055794
  iscsi-init.service - create an iSCSI name if missing before starting iscsid
c055794
  iscsi-shutdown.service - ensure all non-boot sessions logout at shutdown
c055794
---
c055794
 etc/systemd/iscsi-init.service | 1 +
c055794
 etc/systemd/iscsi.service      | 2 +-
c055794
 etc/systemd/iscsid.service     | 2 +-
c055794
 3 files changed, 3 insertions(+), 2 deletions(-)
c055794
c055794
diff --git a/etc/systemd/iscsi-init.service b/etc/systemd/iscsi-init.service
c055794
index e058ff0..c3370ec 100644
c055794
--- a/etc/systemd/iscsi-init.service
c055794
+++ b/etc/systemd/iscsi-init.service
c055794
@@ -1,6 +1,7 @@
c055794
 [Unit]
c055794
 Description=One time configuration for iscsi.service
c055794
 ConditionPathExists=!/etc/iscsi/initiatorname.iscsi
c055794
+Before=iscsid.service
c055794
 
c055794
 [Service]
c055794
 Type=oneshot
c055794
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
c055794
index 175cb2c..6c542d2 100644
c055794
--- a/etc/systemd/iscsi.service
c055794
+++ b/etc/systemd/iscsi.service
c055794
@@ -4,7 +4,7 @@ Documentation=man:iscsiadm(8) man:iscsid(8)
c055794
 DefaultDependencies=no
c055794
 Before=remote-fs-pre.target
c055794
 After=network.target network-online.target iscsid.service iscsiuio.service systemd-remount-fs.service
c055794
-Wants=remote-fs-pre.target iscsi-shutdown.service
c055794
+Wants=remote-fs-pre.target
c055794
 ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes
c055794
 
c055794
 [Service]
c055794
diff --git a/etc/systemd/iscsid.service b/etc/systemd/iscsid.service
c055794
index 28402fb..8b7434f 100644
c055794
--- a/etc/systemd/iscsid.service
c055794
+++ b/etc/systemd/iscsid.service
c055794
@@ -4,6 +4,7 @@ Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
c055794
 DefaultDependencies=no
c055794
 After=network.target iscsiuio.service
c055794
 Before=remote-fs-pre.target
c055794
+Requires=iscsi-init.service iscsi-shutdown.service
c055794
 
c055794
 [Service]
c055794
 Type=notify
c055794
@@ -14,4 +15,3 @@ Restart=on-failure
c055794
 
c055794
 [Install]
c055794
 WantedBy=multi-user.target
c055794
-Also=iscsid.socket
c055794
-- 
c055794
2.26.2
c055794