+ExecStop=/bin/sh -c 'for f in "$@"; do [ -e "$f" ] || continue; echo "$f existed."; exit 1; done; exit 0' -- /run/initramfs/open-iscsi.interface /run/network/network-root-fs
ExecStop=/sbin/ifdown -a --read-environment
This will leave networking.service in "failed" state on stop -- *if* you do this hack, then please just put it into the existing ExecStop= line, and simplify this:
However, this is still a nasty hack. Why would ifdown shut down the interface in the first place? If you use iSCSI, then /e/n/i should *not* have a "dhcp" stanza (and an "auto enXXX) for that interface, but a "manual" one, so that the declaration and behavior don't fight with each other.
I. e.:
- If ifdown downs a "manual" interface, then let's fix that properly.
- If /e/n/i still has a "dhcp" declaration, then drop that (I thought that got fixed ages ago already).
+ExecStop=/bin/sh -c 'for f in "$@"; do [ -e "$f" ] || continue; echo "$f existed."; exit 1; done; exit 0' -- /run/initramfs/ open-iscsi. interface /run/network/ network- root-fs /sbin/ifdown -a --read-environment
ExecStop=
This will leave networking.service in "failed" state on stop -- *if* you do this hack, then please just put it into the existing ExecStop= line, and simplify this:
ExecStop=/bin/sh -c '[ -e /run/initramfs/ open-iscsi. interface /run/network/ network- root-fs ] || ifdown -a --read-environment'
However, this is still a nasty hack. Why would ifdown shut down the interface in the first place? If you use iSCSI, then /e/n/i should *not* have a "dhcp" stanza (and an "auto enXXX) for that interface, but a "manual" one, so that the declaration and behavior don't fight with each other.
I. e.:
- If ifdown downs a "manual" interface, then let's fix that properly.
- If /e/n/i still has a "dhcp" declaration, then drop that (I thought that got fixed ages ago already).