X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=etc%2Finit.d%2Fzfs.gentoo.in;h=5b8671e0a399ebcec894901a7933ac364e7b8d2e;hb=382c4e5184c9caa25e85f277564657243db2a150;hp=31a539cc852f5049bd486900023aa227f0de2d42;hpb=aa2b4896c93bbb2652ddc5e10e66175e54ff56c8;p=zfs.git diff --git a/etc/init.d/zfs.gentoo.in b/etc/init.d/zfs.gentoo.in index 31a539c..5b8671e 100644 --- a/etc/init.d/zfs.gentoo.in +++ b/etc/init.d/zfs.gentoo.in @@ -1,8 +1,13 @@ #!/sbin/runscript # Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 +# 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. @@ -13,13 +18,13 @@ depend() ZFS="@sbindir@/zfs" ZPOOL="@sbindir@/zpool" -ZPOOL_CACHE="@initdir@/zpool.cache" +ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache" ZFS_MODULE=zfs checksystem() { if [ ! -c /dev/zfs ]; then einfo "Checking if ZFS modules present" - if [ "x$(modprobe -l $ZFS_MODULE | grep $ZFS_MODULE)" == "x" ]; then + if ! modinfo zfs > /dev/null 2>&1 ; then eerror "$ZFS_MODULE not found. Is the ZFS package installed?" return 1 fi