iscsi-initiator-utils/0026-try-not-to-require-network-online.patch

35 lines
1.1 KiB
Diff
Raw Normal View History

--- a/Makefile 2023-01-22 13:02:45.681282358 -0800
+++ b/Makefile 2023-01-22 13:03:42.152589777 -0800
@@ -28,6 +28,7 @@
IFACEFILES = etc/iface.example
RULESFILES = utils/50-iscsi-firmware-login.rules
SYSTEMDFILES = etc/systemd/iscsi.service \
+ etc/systemd/iscsi-starter.service \
etc/systemd/iscsi-init.service \
etc/systemd/iscsid.service etc/systemd/iscsid.socket \
etc/systemd/iscsiuio.service etc/systemd/iscsiuio.socket
--- a/etc/systemd/iscsi.service 2023-01-22 13:09:30.516486288 -0800
+++ b/etc/systemd/iscsi.service 2023-01-22 13:08:34.404180819 -0800
@@ -15,4 +15,4 @@
SuccessExitStatus=21
[Install]
-WantedBy=remote-fs.target
+Also=iscsi-starter.service
--- a/dev/null 2023-01-22 13:38:59.072998978 -0800
+++ b/etc/systemd/iscsi-starter.service 2023-01-22 13:42:20.124610009 -0800
@@ -0,0 +1,13 @@
+[Unit]
+DefaultDependencies=no
+Before=sysinit.target iscsi.service
+RequiresMountsFor=/var/lib/iscsi/nodes
+ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStart=systemctl start --no-block --job-mode=fail iscsi.service
+
+[Install]
+WantedBy=sysinit.target