scripts: zfs.sh: explicitly ignore unloaded modules when unloading
Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13356
This commit is contained in:
parent
2f31b585e7
commit
bee24d6929
@ -164,7 +164,7 @@ unload_modules_freebsd() {
|
||||
unload_modules_linux() {
|
||||
NAME="${KMOD_ZFS##*/}"
|
||||
NAME="${NAME%.ko}"
|
||||
$DELMOD "$NAME" || return
|
||||
! [ -d "/sys/module/$NAME" ] || $DELMOD "$NAME" || return
|
||||
|
||||
if [ "$VERBOSE" = "yes" ]; then
|
||||
echo "Successfully unloaded ZFS module stack"
|
||||
|
Loading…
Reference in New Issue
Block a user