Skip to content

Commit

Permalink
Set DEFAULT_INIT_SHELL to /sbin/openrc-run for Gentoo and Alpine
Browse files Browse the repository at this point in the history
Gentoo and Alpine always set the rc init scripts' shebang to
#!/sbin/openrc-run, whether or not openrc is installed.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Closes openzfs#12683 
Closes openzfs#12692
  • Loading branch information
Peter-Levine authored Oct 29, 2021
1 parent 4d4998e commit 6ef28c5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions config/zfs-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -564,15 +564,11 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
*) DEFAULT_INIT_SCRIPT=lsb ;;
esac
# On gentoo, it's possible that OpenRC isn't installed. Check if
# /sbin/openrc-run exists, and if not, fall back to generic defaults.
DEFAULT_INIT_SHELL="/bin/sh"
AS_IF([test "$DEFAULT_INIT_SCRIPT" = "openrc"], [
AS_IF([test -x "/sbin/openrc-run"],
[DEFAULT_INIT_SHELL="/sbin/openrc-run"],
[DEFAULT_INIT_SCRIPT=lsb])
])
case "$VENDOR" in
gentoo) DEFAULT_INIT_SHELL="/sbin/openrc-run";;
alpine) DEFAULT_INIT_SHELL="/sbin/openrc-run";;
*) DEFAULT_INIT_SHELL="/bin/sh" ;;
esac
AC_MSG_RESULT([$DEFAULT_INIT_SCRIPT:$DEFAULT_INIT_SHELL])
AC_SUBST(DEFAULT_INIT_SCRIPT)
Expand Down

0 comments on commit 6ef28c5

Please sign in to comment.