summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorTurbo Fredriksson <[email protected]>2013-04-14 17:41:51 +0200
committerBrian Behlendorf <[email protected]>2013-04-24 16:18:44 -0700
commit382c4e5184c9caa25e85f277564657243db2a150 (patch)
tree70f82019efca38b476ac865a2911e2d52f30dabf /etc
parentc4933aade7ecf8a933c4404ea3f99cac5820bd57 (diff)
Possibility to disable (not start) zfs at bootup.
Signed-off-by: Brian Behlendorf <[email protected]> Issue #1402
Diffstat (limited to 'etc')
-rw-r--r--etc/init.d/zfs.fedora.in5
-rw-r--r--etc/init.d/zfs.gentoo.in5
-rw-r--r--etc/init.d/zfs.lsb.in5
-rw-r--r--etc/init.d/zfs.lunar.in5
-rw-r--r--etc/init.d/zfs.redhat.in5
5 files changed, 25 insertions, 0 deletions
diff --git a/etc/init.d/zfs.fedora.in b/etc/init.d/zfs.fedora.in
index 04f2077ce..3cece9ba4 100644
--- a/etc/init.d/zfs.fedora.in
+++ b/etc/init.d/zfs.fedora.in
@@ -25,6 +25,11 @@
export PATH=/usr/local/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
+if [ -z "$init" ]; then
+ # Not interactive
+ grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
+fi
+
# Source function library & LSB routines
. /etc/rc.d/init.d/functions
diff --git a/etc/init.d/zfs.gentoo.in b/etc/init.d/zfs.gentoo.in
index df883cfa4..5b8671e0a 100644
--- a/etc/init.d/zfs.gentoo.in
+++ b/etc/init.d/zfs.gentoo.in
@@ -3,6 +3,11 @@
# Released under the 2-clause BSD license.
# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/files/zfs,v 0.9 2011/04/30 10:13:43 devsk Exp $
+if [ -z "$init" ]; then
+ # Not interactive
+ grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
+fi
+
depend()
{
# bootmisc will log to /var which may be a different zfs than root.
diff --git a/etc/init.d/zfs.lsb.in b/etc/init.d/zfs.lsb.in
index 3d042065d..0d0ffb4c4 100644
--- a/etc/init.d/zfs.lsb.in
+++ b/etc/init.d/zfs.lsb.in
@@ -36,6 +36,11 @@ ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
[ -x "$ZPOOL" ] || exit 1
[ -x "$ZFS" ] || exit 2
+if [ -z "$init" ]; then
+ # Not interactive
+ grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
+fi
+
start()
{
[ -f "$LOCKFILE" ] && return 3
diff --git a/etc/init.d/zfs.lunar.in b/etc/init.d/zfs.lunar.in
index 97384dc83..3cf79cea0 100644
--- a/etc/init.d/zfs.lunar.in
+++ b/etc/init.d/zfs.lunar.in
@@ -14,6 +14,11 @@ ZFS="@sbindir@/zfs"
ZPOOL="@sbindir@/zpool"
ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
+if [ -z "$init" ]; then
+ # Not interactive
+ grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
+fi
+
case $1 in
start) echo "$1ing ZFS filesystems"
diff --git a/etc/init.d/zfs.redhat.in b/etc/init.d/zfs.redhat.in
index ae797c11a..fb5187f05 100644
--- a/etc/init.d/zfs.redhat.in
+++ b/etc/init.d/zfs.redhat.in
@@ -25,6 +25,11 @@
export PATH=/usr/local/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
+if [ -z "$init" ]; then
+ # Not interactive
+ grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
+fi
+
# Source function library & LSB routines
. /etc/rc.d/init.d/functions