systemd: Use non-absolute paths in Exec* lines
Since systemd v239, Exec* binaries are resolved from PATH when they are not-absolute. Switch to this by default for ease of downstream maintenance. Many downstream distributions move individual binaries to locations that existing compile-time configurations cannot accommodate. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Closes #14880
This commit is contained in:
parent
9d618615d1
commit
79b20949b2
|
@ -15,7 +15,7 @@ ConditionPathIsDirectory=/sys/module/zfs
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
EnvironmentFile=-@initconfdir@/zfs
|
EnvironmentFile=-@initconfdir@/zfs
|
||||||
ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN $ZPOOL_IMPORT_OPTS
|
ExecStart=zpool import -c @sysconfdir@/zfs/zpool.cache -aN $ZPOOL_IMPORT_OPTS
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=zfs-import.target
|
WantedBy=zfs-import.target
|
||||||
|
|
|
@ -14,7 +14,7 @@ ConditionPathIsDirectory=/sys/module/zfs
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
EnvironmentFile=-@initconfdir@/zfs
|
EnvironmentFile=-@initconfdir@/zfs
|
||||||
ExecStart=@sbindir@/zpool import -aN -o cachefile=none $ZPOOL_IMPORT_OPTS
|
ExecStart=zpool import -aN -o cachefile=none $ZPOOL_IMPORT_OPTS
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=zfs-import.target
|
WantedBy=zfs-import.target
|
||||||
|
|
|
@ -12,7 +12,7 @@ ConditionPathIsDirectory=/sys/module/zfs
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
EnvironmentFile=-@initconfdir@/zfs
|
EnvironmentFile=-@initconfdir@/zfs
|
||||||
ExecStart=@sbindir@/zfs mount -a
|
ExecStart=zfs mount -a
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=zfs.target
|
WantedBy=zfs.target
|
||||||
|
|
|
@ -8,8 +8,8 @@ ConditionPathIsDirectory=/sys/module/zfs
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-@initconfdir@/zfs
|
EnvironmentFile=-@initconfdir@/zfs
|
||||||
ExecStart=/bin/sh -c '\
|
ExecStart=sh -c '\
|
||||||
if @sbindir@/zpool status %i | grep -q "scrub in progress"; then\
|
if zpool status %i | grep -q "scrub in progress"; then\
|
||||||
exec @sbindir@/zpool wait -t scrub %i;\
|
exec zpool wait -t scrub %i;\
|
||||||
else exec @sbindir@/zpool scrub -w %i; fi'
|
else exec zpool scrub -w %i; fi'
|
||||||
ExecStop=-/bin/sh -c '@sbindir@/zpool scrub -p %i 2>/dev/null || true'
|
ExecStop=-sh -c 'zpool scrub -p %i 2>/dev/null || true'
|
||||||
|
|
|
@ -14,7 +14,7 @@ ConditionPathIsDirectory=/sys/module/zfs
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
EnvironmentFile=-@initconfdir@/zfs
|
EnvironmentFile=-@initconfdir@/zfs
|
||||||
ExecStart=@sbindir@/zfs share -a
|
ExecStart=zfs share -a
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=zfs.target
|
WantedBy=zfs.target
|
||||||
|
|
|
@ -8,8 +8,8 @@ ConditionPathIsDirectory=/sys/module/zfs
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-@initconfdir@/zfs
|
EnvironmentFile=-@initconfdir@/zfs
|
||||||
ExecStart=/bin/sh -c '\
|
ExecStart=sh -c '\
|
||||||
if @sbindir@/zpool status %i | grep -q "(trimming)"; then\
|
if zpool status %i | grep -q "(trimming)"; then\
|
||||||
exec @sbindir@/zpool wait -t trim %i;\
|
exec zpool wait -t trim %i;\
|
||||||
else exec @sbindir@/zpool trim -w %i; fi'
|
else exec zpool trim -w %i; fi'
|
||||||
ExecStop=-/bin/sh -c '@sbindir@/zpool trim -s %i 2>/dev/null || true'
|
ExecStop=-sh -c 'zpool trim -s %i 2>/dev/null || true'
|
||||||
|
|
|
@ -9,7 +9,7 @@ ConditionPathIsDirectory=/sys/module/zfs
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
EnvironmentFile=-@initconfdir@/zfs
|
EnvironmentFile=-@initconfdir@/zfs
|
||||||
ExecStart=@bindir@/zvol_wait
|
ExecStart=zvol_wait
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=zfs-volumes.target
|
WantedBy=zfs-volumes.target
|
||||||
|
|
|
@ -5,7 +5,7 @@ ConditionPathIsDirectory=/sys/module/zfs
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-@initconfdir@/zfs
|
EnvironmentFile=-@initconfdir@/zfs
|
||||||
ExecStart=@sbindir@/zed -F
|
ExecStart=zed -F
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
Loading…
Reference in New Issue