Skip to content

Commit

Permalink
scripts: zfs.sh: explicitly try to unload spl.ko
Browse files Browse the repository at this point in the history
In case we *only* loaded spl.ko on load

Signed-off-by: Ahelenia Ziemiańska <[email protected]>
  • Loading branch information
nabijaczleweli committed Apr 21, 2022
1 parent c88081d commit 780e593
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/zfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,11 @@ unload_modules_freebsd() {
}

unload_modules_linux() {
NAME="${KMOD_ZFS##*/}"
NAME="${NAME%.ko}"
! [ -d "/sys/module/$NAME" ] || $DELMOD "$NAME" || return
for KMOD in "$KMOD_ZFS" "$KMOD_SPL"; do
NAME="${KMOD##*/}"
NAME="${NAME%.ko}"
! [ -d "/sys/module/$NAME" ] || $DELMOD "$NAME" || return
done

if [ "$VERBOSE" = "yes" ]; then
echo "Successfully unloaded ZFS module stack"
Expand Down

0 comments on commit 780e593

Please sign in to comment.