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