Skip to content

Commit

Permalink
Ensure $mountdir is set if autoexpand is skipped
Browse files Browse the repository at this point in the history
Closes #288
  • Loading branch information
Drewsif committed Oct 10, 2024
1 parent fe6971d commit 02a87e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pishrink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ else
#Shrink filesystem
info "Shrinking filesystem"
resize2fs -p "$loopback" $minsize
if [ -n "$mount_dir" ]; then
mountdir=$(mktemp -d)
fi
rc=$?
if (( $rc )); then
error $LINENO "resize2fs failed with rc $rc"
Expand Down

0 comments on commit 02a87e0

Please sign in to comment.