diff options
author | Lee Duncan <lduncan@suse.com> | 2022-02-24 14:56:24 -0800 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2022-02-24 14:56:24 -0800 |
commit | ee7e432d79dafbc37744503df238d463a8a96084 (patch) | |
tree | 9ca4e8148ac37f9d2f8edb816f6f126380e8bb93 | |
parent | e3a5f4d1be0838398c8ce8fa883a060a200f7697 (diff) | |
download | open-iscsi-ee7e432d79dafbc37744503df238d463a8a96084.tar.gz |
Fix iscsi-init.service start time
The commit e6e53d6e60bf ("Fix iscsi-init so that it runs when
root writable") added "After=root.mount" to iscsi-init.service,
but that was an error, since that means waiting for "/root".
Remove that line and add the proper configuration so that
the iscsi-init service does not try to write to
/etc/iscsi/initiatorname.iscsi unless /etc/iscsi is
writable.
-rw-r--r-- | etc/systemd/iscsi-init.service | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/systemd/iscsi-init.service b/etc/systemd/iscsi-init.service index 17792da..8f9a8aa 100644 --- a/etc/systemd/iscsi-init.service +++ b/etc/systemd/iscsi-init.service @@ -2,7 +2,16 @@ Description=One time configuration for iscsi.service ConditionPathExists=!/etc/iscsi/initiatorname.iscsi DefaultDependencies=no -After=root.mount +RequiresMountsFor=/etc/iscsi +# systemd-remount-fs.service is optionally pulled in by +# local-fs.target, don't start it here (no Wants=) but if +# it's running wait for it to finish +After=systemd-remount-fs.service + +[Install] +# this ensures we are in the same transaction with +# systemd-remount-fs.service +WantedBy=systemd-remount-fs.service [Service] Type=oneshot |