diff options
author | Alexey Shvetsov <[email protected]> | 2011-05-11 00:22:35 +0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-05-12 14:45:57 -0700 |
commit | 06abcdd3f44999f694766b22a5fc42d125aa9bef (patch) | |
tree | def84dbf4781cfbecdcfdfdebf5a1d2c82baa5d9 | |
parent | 04c22478a7365622a8f3c7fd7d0046fe41813075 (diff) |
Fix zfs.gentoo init script logic
* Fix zfs.ko module check
* Check 'zfs umount -a' return value
-rw-r--r-- | etc/init.d/zfs.gentoo | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/init.d/zfs.gentoo b/etc/init.d/zfs.gentoo index 5c329cea7..1d8ece2c8 100644 --- a/etc/init.d/zfs.gentoo +++ b/etc/init.d/zfs.gentoo @@ -21,7 +21,7 @@ checksystem() { return 0 else einfo "Checking if ZFS modules present" - if [ -e $(modprobe -l $ZFS_MODULE | grep -q $ZFS_MODULE) ]; then + if [ "x$(modprobe -l $ZFS_MODULE | grep $ZFS_MODULE)" == "x" ]; then eerror "$ZFS_MODULE not found. Is the ZFS package installed?" return 1 fi @@ -94,6 +94,7 @@ stop() { ebegin "Unmounting ZFS filesystems" $ZFS umount -a + rv=$? if [ $rv -ne 0 ]; then eerror "Failed to umount ZFS filesystems." fi |