aboutsummaryrefslogtreecommitdiffstats
path: root/etc/init.d/zfs-mount.in
diff options
context:
space:
mode:
authorBenda Xu <[email protected]>2024-04-09 07:52:24 +0800
committerGitHub <[email protected]>2024-04-08 16:52:24 -0700
commit162cc80b8144698b44b5b168dc1853341277de10 (patch)
treecc09cef77f61defb772642d3ddb9300ef3dee5a5 /etc/init.d/zfs-mount.in
parentf07389d3ad48ba21480dedcd79b75fe0a31e27bc (diff)
etc/init.d: decide which variant to use at build time.
Let Debian use the sysv-rc variant of the script, even when OpenRC is installed. Unlike on Gentoo, OpenRC on Debian consumes both the sysv-rc scripts and OpenRC ones. ZFS initscripts on Debian should be the sysv-rc version to provide most compatibility and to integrate with the rest of initscripts for dependency tracking. Restrict the substitution in the Makefile to the dedicated list. This construct is inspired by Mo Zhou's detection of the execution shell and follows the strategy of Peter in 6ef28c526ba7. As of 2024, the initscripts are mostly relevant on Debian, Gentoo and their derivatives. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Benda Xu <[email protected]> Issue #8063 Issue #8204 Issue #8359 Closes #15977
Diffstat (limited to 'etc/init.d/zfs-mount.in')
-rwxr-xr-xetc/init.d/zfs-mount.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/init.d/zfs-mount.in b/etc/init.d/zfs-mount.in
index a0825f19f..6a3ca5f86 100755
--- a/etc/init.d/zfs-mount.in
+++ b/etc/init.d/zfs-mount.in
@@ -114,7 +114,7 @@ do_stop()
# ----------------------------------------------------
-if [ ! -e /sbin/openrc-run ]
+if @IS_SYSV_RC@
then
case "$1" in
start)