summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <[email protected]>2016-03-01 16:36:28 +0100
committerBrian Behlendorf <[email protected]>2016-03-08 13:19:53 -0800
commitc53fb0113cc372ed8df3c08f59f83cb3ceee849b (patch)
tree4f349572cb1897fb139914c1e82a8905347da17f
parent513168abd267f84ebcb688b4e1d42a2abd4fedce (diff)
Add support for alpine linux
Both Alpine Linux and Gentoo use OpenRC so we share its logic Signed-off-by: Carlo Landmeter <[email protected]> Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #4386
-rw-r--r--config/zfs-build.m47
-rw-r--r--etc/init.d/Makefile.am2
-rwxr-xr-xetc/init.d/zfs-import.in2
-rwxr-xr-xetc/init.d/zfs-mount.in2
-rwxr-xr-xetc/init.d/zfs-share.in2
-rwxr-xr-xetc/init.d/zfs-zed.in2
6 files changed, 11 insertions, 6 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
index f93c5b5d4..9d3f0a6f5 100644
--- a/config/zfs-build.m4
+++ b/config/zfs-build.m4
@@ -266,6 +266,8 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
VENDOR=ubuntu ;
elif test -f /etc/debian_version ; then
VENDOR=debian ;
+ elif test -f /etc/alpine-release ; then
+ VENDOR=alpine ;
else
VENDOR= ;
fi
@@ -278,6 +280,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
redhat) DEFAULT_PACKAGE=rpm ;;
fedora) DEFAULT_PACKAGE=rpm ;;
gentoo) DEFAULT_PACKAGE=tgz ;;
+ alpine) DEFAULT_PACKAGE=tgz ;;
arch) DEFAULT_PACKAGE=tgz ;;
sles) DEFAULT_PACKAGE=rpm ;;
slackware) DEFAULT_PACKAGE=tgz ;;
@@ -299,7 +302,8 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
toss) DEFAULT_INIT_SCRIPT=redhat ;;
redhat) DEFAULT_INIT_SCRIPT=redhat ;;
fedora) DEFAULT_INIT_SCRIPT=fedora ;;
- gentoo) DEFAULT_INIT_SCRIPT=gentoo ;;
+ 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 ;;
@@ -313,6 +317,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
AC_MSG_CHECKING([default init config direectory])
case "$VENDOR" in
+ alpine) DEFAULT_INITCONF_DIR=/etc/conf.d ;;
gentoo) DEFAULT_INITCONF_DIR=/etc/conf.d ;;
toss) DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
redhat) DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
diff --git a/etc/init.d/Makefile.am b/etc/init.d/Makefile.am
index 5f70fc658..c6e29d1a5 100644
--- a/etc/init.d/Makefile.am
+++ b/etc/init.d/Makefile.am
@@ -21,7 +21,7 @@ $(init_SCRIPTS) $(initconf_SCRIPTS) $(initcommon_SCRIPTS): $(EXTRA_DIST)
else \
NFS_SRV=nfs; \
fi; \
- if [ -e /etc/gentoo-release ]; then \
+ if [ -e /sbin/openrc-run ]; then \
SHELL=/sbin/runscript; \
else \
SHELL=/bin/sh; \
diff --git a/etc/init.d/zfs-import.in b/etc/init.d/zfs-import.in
index 22586389a..354bbc6fd 100755
--- a/etc/init.d/zfs-import.in
+++ b/etc/init.d/zfs-import.in
@@ -308,7 +308,7 @@ do_start()
# ----------------------------------------------------
-if [ ! -e /etc/gentoo-release ]
+if [ ! -e /sbin/openrc-run ]
then
case "$1" in
start)
diff --git a/etc/init.d/zfs-mount.in b/etc/init.d/zfs-mount.in
index 05cea9b88..34db057c8 100755
--- a/etc/init.d/zfs-mount.in
+++ b/etc/init.d/zfs-mount.in
@@ -199,7 +199,7 @@ do_stop()
# ----------------------------------------------------
-if [ ! -e /etc/gentoo-release ]
+if [ ! -e /sbin/openrc-run ]
then
case "$1" in
start)
diff --git a/etc/init.d/zfs-share.in b/etc/init.d/zfs-share.in
index 1b70da4d5..ce3cc1cc2 100755
--- a/etc/init.d/zfs-share.in
+++ b/etc/init.d/zfs-share.in
@@ -58,7 +58,7 @@ do_stop()
# ----------------------------------------------------
-if [ ! -e /etc/gentoo-release ]; then
+if [ ! -e /sbin/openrc-run ]; then
case "$1" in
start)
do_start
diff --git a/etc/init.d/zfs-zed.in b/etc/init.d/zfs-zed.in
index 86e31855e..d0086eefd 100755
--- a/etc/init.d/zfs-zed.in
+++ b/etc/init.d/zfs-zed.in
@@ -98,7 +98,7 @@ do_reload()
# ----------------------------------------------------
-if [ ! -e /etc/gentoo-release ]; then
+if [ ! -e /sbin/openrc-run ]; then
case "$1" in
start)
do_start