diff options
author | Adam D. Moss <[email protected]> | 2021-02-20 20:23:10 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-20 20:23:10 -0800 |
commit | 9312e0fd1e162094ba2470408878879fa24eeaf7 (patch) | |
tree | e0d63d9f53263e31ff922567fb36309e15de65a0 | |
parent | 11f2e9a491baa2ae3fc00f6b8b892fa91a852ca1 (diff) |
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 <[email protected]>
Signed-off-by: Adam Moss <[email protected]>
Closes #11627
-rwxr-xr-x | scripts/zfs.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/zfs.sh b/scripts/zfs.sh index c131429c9..2f5f3f8fd 100755 --- a/scripts/zfs.sh +++ b/scripts/zfs.sh @@ -198,7 +198,7 @@ unload_modules_linux() { if [ "$USE_COUNT" = "0" ] ; then unload_module_linux "$KMOD" || return 1 - else + elif [ "$USE_COUNT" != "" ] ; then echo "Module ${NAME} is still in use!" return 1 fi |