diff options
author | Benda Xu <[email protected]> | 2024-04-09 07:52:24 +0800 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2024-04-22 09:28:06 -0700 |
commit | 6732e223bf700bd8bb45d6af6221f5a9418b1493 (patch) | |
tree | a7291cafd5bf8056d4ad6f1fdd9b1e96319cf837 /etc/init.d/zfs-mount.in | |
parent | baaac316554273f84c8bec06bddb7c5a09967c09 (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-x | etc/init.d/zfs-mount.in | 2 |
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) |