Fixed a couple bugs in disk resize.

This commit is contained in:
Storm Dragon 2021-10-23 17:23:16 -04:00
parent 46a35088c6
commit 955af1e786

View File

@ -34,7 +34,8 @@ fi
# Check for possible resize # Check for possible resize
diskSource="$(df --output='source' / | tail -1)" diskSource="$(df --output='source' / | tail -1)"
diskSize="$(df -h --output='size' / | tail -1 | tr -cd '[:digit:]')" diskSize="$(df -h --output='size' / | tail -1 | tr -cd '[:digit:].')"
diskSize=${diskSize%.*}
if [[ $diskSize -le 5 ]]; then if [[ $diskSize -le 5 ]]; then
if [[ "$(yesno "$diskSource is only $diskSize gigs, which means it probably needs to be resized. Would you like to do this now?")" == "Yes" ]]; then if [[ "$(yesno "$diskSource is only $diskSize gigs, which means it probably needs to be resized. Would you like to do this now?")" == "Yes" ]]; then
sudo growpartfs $diskSource sudo growpartfs $diskSource