Skip to content

Commit

Permalink
mt: fix for unset position arg in zfs_destroy_fs
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Sep 5, 2024
1 parent e58c6e6 commit cf385cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mail-toaster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ zfs_create_fs()
zfs_destroy_fs()
{
local _fs="$1"
local _flags="$2"
local _flags=${2-}

if ! zfs_filesystem_exists "$_fs"; then return; fi

Expand Down Expand Up @@ -553,12 +553,14 @@ stage_unmount()
{
for _fs in $(mount | grep stage | sort -u | awk '{ print $3 }'); do
if [ "$(basename "$_fs")" = "stage" ]; then continue; fi
umount "$_fs" || echo "unable to umount $_fs"
echo "umount $_fs"
umount "$_fs" || echo ""
done

# repeat, as sometimes a nested fs will prevent first try from success
for _fs in $(mount | grep stage | sort -u | awk '{ print $3 }'); do
if [ "$(basename "$_fs")" = "stage" ]; then continue; fi
echo "umount $_fs"
umount "$_fs"
done

Expand Down

0 comments on commit cf385cd

Please sign in to comment.