autoconf: add support for openEuler
Add config support for openEuler, so that it set the right sysconfig dir for openEuler. And DEFAULT_INIT_SCRIPT is no longer needed since commit "2a34db1bd Base init scripts for SYSV systems". Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org> Closes #14241
This commit is contained in:
parent
fe975048da
commit
db6ba8d744
@ -532,6 +532,8 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
||||
VENDOR=alpine ;
|
||||
elif test -f /bin/freebsd-version ; then
|
||||
VENDOR=freebsd ;
|
||||
elif test -f /etc/openEuler-release ; then
|
||||
VENDOR=openeuler ;
|
||||
else
|
||||
VENDOR= ;
|
||||
fi],
|
||||
@ -556,6 +558,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
||||
ubuntu) DEFAULT_PACKAGE=deb ;;
|
||||
debian) DEFAULT_PACKAGE=deb ;;
|
||||
freebsd) DEFAULT_PACKAGE=pkg ;;
|
||||
openeuler) DEFAULT_PACKAGE=rpm ;;
|
||||
*) DEFAULT_PACKAGE=rpm ;;
|
||||
esac
|
||||
AC_MSG_RESULT([$DEFAULT_PACKAGE])
|
||||
@ -569,31 +572,14 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
||||
AC_MSG_RESULT([$initdir])
|
||||
AC_SUBST(initdir)
|
||||
|
||||
AC_MSG_CHECKING([default init script type and shell])
|
||||
case "$VENDOR" in
|
||||
toss) DEFAULT_INIT_SCRIPT=redhat ;;
|
||||
redhat) DEFAULT_INIT_SCRIPT=redhat ;;
|
||||
fedora) DEFAULT_INIT_SCRIPT=fedora ;;
|
||||
gentoo) DEFAULT_INIT_SCRIPT=openrc ;;
|
||||
alpine) DEFAULT_INIT_SCRIPT=openrc ;;
|
||||
arch) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
sles) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
slackware) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
lunar) DEFAULT_INIT_SCRIPT=lunar ;;
|
||||
ubuntu) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
debian) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
freebsd) DEFAULT_INIT_SCRIPT=freebsd;;
|
||||
*) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING([default shell])
|
||||
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)
|
||||
AC_MSG_RESULT([$DEFAULT_INIT_SHELL])
|
||||
AC_SUBST(DEFAULT_INIT_SHELL)
|
||||
|
||||
AC_MSG_CHECKING([default nfs server init script])
|
||||
@ -612,6 +598,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
||||
redhat) initconfdir=/etc/sysconfig ;;
|
||||
fedora) initconfdir=/etc/sysconfig ;;
|
||||
sles) initconfdir=/etc/sysconfig ;;
|
||||
openeuler) initconfdir=/etc/sysconfig ;;
|
||||
ubuntu) initconfdir=/etc/default ;;
|
||||
debian) initconfdir=/etc/default ;;
|
||||
freebsd) initconfdir=$sysconfdir/rc.conf.d;;
|
||||
|
Loading…
Reference in New Issue
Block a user