diff options
author | Rich Ercolani <214141+rincebrain@users.noreply.github.com> | 2023-06-07 18:14:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-07 18:14:05 +0000 |
commit | 6c962690245a6a2a4dfc2350c71a249641139c26 (patch) | |
tree | dfaa1a5e26b44b86eb6e788ac9e8c50c8759cf2c | |
parent | 93f8abeff08e9c4363ec4d53d501cf21830c95e1 (diff) | |
download | src-6c962690245a6a2a4dfc2350c71a249641139c26.tar.gz src-6c962690245a6a2a4dfc2350c71a249641139c26.zip |
Revert "systemd: Use non-absolute paths in Exec* lines"
This reverts commit 79b20949b25c8db4d379f6486b0835a6613b480c since it
doesn't work with the systemd version shipped with RHEL7-based systems.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #14943
Closes #14945
-rw-r--r-- | etc/systemd/system/zfs-import-cache.service.in | 2 | ||||
-rw-r--r-- | etc/systemd/system/zfs-import-scan.service.in | 2 | ||||
-rw-r--r-- | etc/systemd/system/zfs-mount.service.in | 2 | ||||
-rw-r--r-- | etc/systemd/system/zfs-scrub@.service.in | 10 | ||||
-rw-r--r-- | etc/systemd/system/zfs-share.service.in | 2 | ||||
-rw-r--r-- | etc/systemd/system/zfs-trim@.service.in | 10 | ||||
-rw-r--r-- | etc/systemd/system/zfs-volume-wait.service.in | 2 | ||||
-rw-r--r-- | etc/systemd/system/zfs-zed.service.in | 2 |
8 files changed, 16 insertions, 16 deletions
diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in index 6d9a065e7e3a..fd822989da93 100644 --- a/etc/systemd/system/zfs-import-cache.service.in +++ b/etc/systemd/system/zfs-import-cache.service.in @@ -15,7 +15,7 @@ ConditionPathIsDirectory=/sys/module/zfs Type=oneshot RemainAfterExit=yes EnvironmentFile=-@initconfdir@/zfs -ExecStart=zpool import -c @sysconfdir@/zfs/zpool.cache -aN $ZPOOL_IMPORT_OPTS +ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN $ZPOOL_IMPORT_OPTS [Install] WantedBy=zfs-import.target diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in index fb524f3b0889..c5dd45d87e68 100644 --- a/etc/systemd/system/zfs-import-scan.service.in +++ b/etc/systemd/system/zfs-import-scan.service.in @@ -14,7 +14,7 @@ ConditionPathIsDirectory=/sys/module/zfs Type=oneshot RemainAfterExit=yes EnvironmentFile=-@initconfdir@/zfs -ExecStart=zpool import -aN -o cachefile=none $ZPOOL_IMPORT_OPTS +ExecStart=@sbindir@/zpool import -aN -o cachefile=none $ZPOOL_IMPORT_OPTS [Install] WantedBy=zfs-import.target diff --git a/etc/systemd/system/zfs-mount.service.in b/etc/systemd/system/zfs-mount.service.in index fc4e1c49f1c5..66d894923f4a 100644 --- a/etc/systemd/system/zfs-mount.service.in +++ b/etc/systemd/system/zfs-mount.service.in @@ -12,7 +12,7 @@ ConditionPathIsDirectory=/sys/module/zfs Type=oneshot RemainAfterExit=yes EnvironmentFile=-@initconfdir@/zfs -ExecStart=zfs mount -a +ExecStart=@sbindir@/zfs mount -a [Install] WantedBy=zfs.target diff --git a/etc/systemd/system/zfs-scrub@.service.in b/etc/systemd/system/zfs-scrub@.service.in index 2bb2757d5e97..8ffffeb0cf6c 100644 --- a/etc/systemd/system/zfs-scrub@.service.in +++ b/etc/systemd/system/zfs-scrub@.service.in @@ -8,8 +8,8 @@ ConditionPathIsDirectory=/sys/module/zfs [Service] EnvironmentFile=-@initconfdir@/zfs -ExecStart=sh -c '\ -if zpool status %i | grep -q "scrub in progress"; then\ -exec zpool wait -t scrub %i;\ -else exec zpool scrub -w %i; fi' -ExecStop=-sh -c 'zpool scrub -p %i 2>/dev/null || true' +ExecStart=/bin/sh -c '\ +if @sbindir@/zpool status %i | grep -q "scrub in progress"; then\ +exec @sbindir@/zpool wait -t scrub %i;\ +else exec @sbindir@/zpool scrub -w %i; fi' +ExecStop=-/bin/sh -c '@sbindir@/zpool scrub -p %i 2>/dev/null || true' diff --git a/etc/systemd/system/zfs-share.service.in b/etc/systemd/system/zfs-share.service.in index dd321f490fe6..1a6342a06fec 100644 --- a/etc/systemd/system/zfs-share.service.in +++ b/etc/systemd/system/zfs-share.service.in @@ -14,7 +14,7 @@ ConditionPathIsDirectory=/sys/module/zfs Type=oneshot RemainAfterExit=yes EnvironmentFile=-@initconfdir@/zfs -ExecStart=zfs share -a +ExecStart=@sbindir@/zfs share -a [Install] WantedBy=zfs.target diff --git a/etc/systemd/system/zfs-trim@.service.in b/etc/systemd/system/zfs-trim@.service.in index f55e36cd8454..423fb448c16f 100644 --- a/etc/systemd/system/zfs-trim@.service.in +++ b/etc/systemd/system/zfs-trim@.service.in @@ -8,8 +8,8 @@ ConditionPathIsDirectory=/sys/module/zfs [Service] EnvironmentFile=-@initconfdir@/zfs -ExecStart=sh -c '\ -if zpool status %i | grep -q "(trimming)"; then\ -exec zpool wait -t trim %i;\ -else exec zpool trim -w %i; fi' -ExecStop=-sh -c 'zpool trim -s %i 2>/dev/null || true' +ExecStart=/bin/sh -c '\ +if @sbindir@/zpool status %i | grep -q "(trimming)"; then\ +exec @sbindir@/zpool wait -t trim %i;\ +else exec @sbindir@/zpool trim -w %i; fi' +ExecStop=-/bin/sh -c '@sbindir@/zpool trim -s %i 2>/dev/null || true' diff --git a/etc/systemd/system/zfs-volume-wait.service.in b/etc/systemd/system/zfs-volume-wait.service.in index a86a3561e032..110c0f5f52ee 100644 --- a/etc/systemd/system/zfs-volume-wait.service.in +++ b/etc/systemd/system/zfs-volume-wait.service.in @@ -9,7 +9,7 @@ ConditionPathIsDirectory=/sys/module/zfs Type=oneshot RemainAfterExit=yes EnvironmentFile=-@initconfdir@/zfs -ExecStart=zvol_wait +ExecStart=@bindir@/zvol_wait [Install] WantedBy=zfs-volumes.target diff --git a/etc/systemd/system/zfs-zed.service.in b/etc/systemd/system/zfs-zed.service.in index ac58ad3eff7b..be2fc67348f9 100644 --- a/etc/systemd/system/zfs-zed.service.in +++ b/etc/systemd/system/zfs-zed.service.in @@ -5,7 +5,7 @@ ConditionPathIsDirectory=/sys/module/zfs [Service] EnvironmentFile=-@initconfdir@/zfs -ExecStart=zed -F +ExecStart=@sbindir@/zed -F Restart=always [Install] |