]> granicus.if.org Git - zfs/commitdiff
Possibility to disable (not start) zfs at bootup.
authorTurbo Fredriksson <turbo@bayour.com>
Sun, 14 Apr 2013 15:41:51 +0000 (17:41 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 24 Apr 2013 23:18:44 +0000 (16:18 -0700)
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1402

etc/init.d/zfs.fedora.in
etc/init.d/zfs.gentoo.in
etc/init.d/zfs.lsb.in
etc/init.d/zfs.lunar.in
etc/init.d/zfs.redhat.in

index 04f2077ceb418e36283efdb83a09a4fc27347f66..3cece9ba4b31cdff28cc1869076a174eadfe640e 100644 (file)
 
 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
 
index df883cfa4d903b8a38e8100be820879b32d33822..5b8671e0a399ebcec894901a7933ac364e7b8d2e 100644 (file)
@@ -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.
index 3d042065d9396643d21eaa10ac139e8b7552a072..0d0ffb4c42a844ceaa223b686b801f05bbc306a0 100644 (file)
@@ -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
index 97384dc833aa5ea02d5d891e4b9df2851988e92d..3cf79cea03cffd4c2c3f6257d676991aaf9d9cd5 100644 (file)
@@ -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"
 
index ae797c11a5c28d8aa3436c03eba81bdb9aca8e61..fb5187f05292eef9108e81c3cb35e0d1971befc3 100644 (file)
 
 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