mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
Fix error message when zfs module are already unloaded
Using zfs-sh -u on linux will fail with inaccurate message when the zfs modules are already unloaded. Deal with the case where a module is already unloaded; its USE_COUNT will be the empty string Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Adam Moss <c@yotes.com> Closes #11627
This commit is contained in:
parent
11f2e9a491
commit
9312e0fd1e
@ -198,7 +198,7 @@ unload_modules_linux() {
|
|||||||
|
|
||||||
if [ "$USE_COUNT" = "0" ] ; then
|
if [ "$USE_COUNT" = "0" ] ; then
|
||||||
unload_module_linux "$KMOD" || return 1
|
unload_module_linux "$KMOD" || return 1
|
||||||
else
|
elif [ "$USE_COUNT" != "" ] ; then
|
||||||
echo "Module ${NAME} is still in use!"
|
echo "Module ${NAME} is still in use!"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user