Fixed a couple bugs in disk resize.
This commit is contained in:
parent
46a35088c6
commit
955af1e786
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user