Fix zfs.gentoo init script logic
* Fix zfs.ko module check * Check 'zfs umount -a' return value
This commit is contained in:
parent
04c22478a7
commit
06abcdd3f4
|
@ -21,7 +21,7 @@ checksystem() {
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
einfo "Checking if ZFS modules present"
|
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?"
|
eerror "$ZFS_MODULE not found. Is the ZFS package installed?"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
@ -94,6 +94,7 @@ stop()
|
||||||
{
|
{
|
||||||
ebegin "Unmounting ZFS filesystems"
|
ebegin "Unmounting ZFS filesystems"
|
||||||
$ZFS umount -a
|
$ZFS umount -a
|
||||||
|
rv=$?
|
||||||
if [ $rv -ne 0 ]; then
|
if [ $rv -ne 0 ]; then
|
||||||
eerror "Failed to umount ZFS filesystems."
|
eerror "Failed to umount ZFS filesystems."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue