only grep the first occurance (not efi)

This commit is contained in:
Daniel Hansson 2020-06-01 19:55:37 +02:00 committed by GitHub
parent 17378ebf21
commit cf5ca2b4d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ is_process_running dpkg
# Check if /boot is filled more than 90% and exit the script if that's the case since we don't want to end up with a broken system
if [ -d /boot ]
then
if [[ "$(df -h | grep /boot | awk '{print $5}' | cut -d "%" -f1)" -gt 90 ]]
if [[ "$(df -h | grep -m 1 /boot | awk '{print $5}' | cut -d "%" -f1)" -gt 90 ]]
then
msg_box "It seems like your boot drive is filled more than 90%. You can't proceed to upgrade since it probably will break your system