diff options
author | Zachary Bedell <[email protected]> | 2011-07-04 14:58:51 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-07-06 09:20:14 -0700 |
commit | e93ced48475b697734ae4fbc65c4e600b9752849 (patch) | |
tree | d7de7af9d11ece2d71b8e98c5525644fd580bcee | |
parent | c8082367cfe9954f0e932fb1513b518d8b84022d (diff) |
Update zfs.gentoo/zfs.lsb init script
* Update paths to zpool/zfs tools,
* Log less for non-error conditions,
* Don't be fatal if umount fails at shutdown -- final init remount
will take care of it if /usr or / are in use
Signed-off-by: Brian Behlendorf <[email protected]>
-rw-r--r-- | etc/init.d/zfs.gentoo | 18 | ||||
-rw-r--r-- | etc/init.d/zfs.lsb | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/etc/init.d/zfs.gentoo b/etc/init.d/zfs.gentoo index d43a5a06e..d7e1d1055 100644 --- a/etc/init.d/zfs.gentoo +++ b/etc/init.d/zfs.gentoo @@ -5,21 +5,19 @@ depend() { - before net + # bootmisc will log to /var which may be a different zfs than root. + before net bootmisc after udev localmount keyword -lxc -openvz -prefix -vserver } CACHEFILE=/etc/zfs/zpool.cache -ZPOOL=/usr/sbin/zpool -ZFS=/usr/sbin/zfs +ZPOOL=/sbin/zpool +ZFS=/sbin/zfs ZFS_MODULE=zfs checksystem() { - if [ -c /dev/zfs ]; then - einfo "ZFS modules already loaded" - return 0 - else + if [ ! -c /dev/zfs ]; then einfo "Checking if ZFS modules present" if [ "x$(modprobe -l $ZFS_MODULE | grep $ZFS_MODULE)" == "x" ]; then eerror "$ZFS_MODULE not found. Is the ZFS package installed?" @@ -89,10 +87,12 @@ stop() $ZFS umount -a rv=$? if [ $rv -ne 0 ]; then - eerror "Failed to umount ZFS filesystems." + einfo "Some ZFS filesystems not unmounted" fi - eend $rv + # Don't fail if we couldn't umount everything. /usr might be in use. + eend 0 + return 0 } status() diff --git a/etc/init.d/zfs.lsb b/etc/init.d/zfs.lsb index 6c0a743cc..c342a6b5c 100644 --- a/etc/init.d/zfs.lsb +++ b/etc/init.d/zfs.lsb @@ -32,8 +32,8 @@ RETVAL=0 LOCKFILE=/var/lock/zfs CACHEFILE=/etc/zfs/zpool.cache -ZPOOL=/usr/sbin/zpool -ZFS=/usr/sbin/zfs +ZPOOL=/sbin/zpool +ZFS=/sbin/zfs [ -x $ZPOOL ] || exit 1 [ -x $ZFS ] || exit 2 |