aboutsummaryrefslogtreecommitdiffstats
path: root/etc/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'etc/init.d')
-rw-r--r--etc/init.d/Makefile.am39
-rwxr-xr-x[-rw-r--r--]etc/init.d/zfs-import.in2
-rwxr-xr-x[-rw-r--r--]etc/init.d/zfs-mount.in2
-rwxr-xr-x[-rw-r--r--]etc/init.d/zfs-share.in6
-rwxr-xr-x[-rw-r--r--]etc/init.d/zfs-zed.in2
5 files changed, 10 insertions, 41 deletions
diff --git a/etc/init.d/Makefile.am b/etc/init.d/Makefile.am
index f97459803..9285a995a 100644
--- a/etc/init.d/Makefile.am
+++ b/etc/init.d/Makefile.am
@@ -1,38 +1,7 @@
-initdir = $(DEFAULT_INIT_DIR)
-init_SCRIPTS = zfs-import zfs-mount zfs-share zfs-zed
-
-initconfdir = $(DEFAULT_INITCONF_DIR)
+include $(top_srcdir)/config/Substfiles.am
-EXTRA_DIST = \
- zfs-share.in \
- zfs-import.in \
- zfs-mount.in \
- zfs-zed.in \
- README.md
+EXTRA_DIST += README.md
-$(init_SCRIPTS):%:%.in Makefile
- -(if [ -e /etc/debian_version ]; then \
- NFS_SRV=nfs-kernel-server; \
- else \
- NFS_SRV=nfs; \
- fi; \
- if [ -e /sbin/openrc-run ]; then \
- SHELL=/sbin/openrc-run; \
- else \
- SHELL=/bin/sh; \
- fi; \
- $(SED) \
- -e 's,@bindir\@,$(bindir),g' \
- -e 's,@sbindir\@,$(sbindir),g' \
- -e 's,@udevdir\@,$(udevdir),g' \
- -e 's,@udevruledir\@,$(udevruledir),g' \
- -e 's,@sysconfdir\@,$(sysconfdir),g' \
- -e 's,@initconfdir\@,$(initconfdir),g' \
- -e 's,@initdir\@,$(initdir),g' \
- -e 's,@runstatedir\@,$(runstatedir),g' \
- -e "s,@SHELL\@,$$SHELL,g" \
- -e "s,@NFS_SRV\@,$$NFS_SRV,g" \
- $< >'$@'; \
- chmod +x '$@')
+init_SCRIPTS = zfs-import zfs-mount zfs-share zfs-zed
-CLEANFILES = $(init_SCRIPTS)
+SUBSTFILES += $(init_SCRIPTS)
diff --git a/etc/init.d/zfs-import.in b/etc/init.d/zfs-import.in
index 47c957baa..714cc6c08 100644..100755
--- a/etc/init.d/zfs-import.in
+++ b/etc/init.d/zfs-import.in
@@ -1,4 +1,4 @@
-#!@SHELL@
+#!@DEFAULT_INIT_SHELL@
#
# zfs-import This script will import ZFS pools
#
diff --git a/etc/init.d/zfs-mount.in b/etc/init.d/zfs-mount.in
index fa954e093..9b400916f 100644..100755
--- a/etc/init.d/zfs-mount.in
+++ b/etc/init.d/zfs-mount.in
@@ -1,4 +1,4 @@
-#!@SHELL@
+#!@DEFAULT_INIT_SHELL@
#
# zfs-mount This script will mount/umount the zfs filesystems.
#
diff --git a/etc/init.d/zfs-share.in b/etc/init.d/zfs-share.in
index bdbadf6fe..3256d1d06 100644..100755
--- a/etc/init.d/zfs-share.in
+++ b/etc/init.d/zfs-share.in
@@ -1,4 +1,4 @@
-#!@SHELL@
+#!@DEFAULT_INIT_SHELL@
#
# zfs-share This script will network share zfs filesystems and volumes.
#
@@ -13,8 +13,8 @@
# Required-Stop: $local_fs $network $remote_fs zfs-mount
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Should-Start: iscsi iscsitarget istgt scst @NFS_SRV@ samba samba4 zfs-mount zfs-zed
-# Should-Stop: iscsi iscsitarget istgt scst @NFS_SRV@ samba samba4 zfs-mount zfs-zed
+# Should-Start: iscsi iscsitarget istgt scst @DEFAULT_INIT_NFS_SERVER@ samba samba4 zfs-mount zfs-zed
+# Should-Stop: iscsi iscsitarget istgt scst @DEFAULT_INIT_NFS_SERVER@ samba samba4 zfs-mount zfs-zed
# Short-Description: Network share ZFS datasets and volumes.
# Description: Run the `zfs share -a` or `zfs unshare -a` commands
# for controlling iSCSI, NFS, or CIFS network shares.
diff --git a/etc/init.d/zfs-zed.in b/etc/init.d/zfs-zed.in
index fe3c22594..6af9ee60c 100644..100755
--- a/etc/init.d/zfs-zed.in
+++ b/etc/init.d/zfs-zed.in
@@ -1,4 +1,4 @@
-#!@SHELL@
+#!@DEFAULT_INIT_SHELL@
#
# zfs-zed
#