Skip to content

Commit

Permalink
Merge pull request #362 from mariux64/fix-361
Browse files Browse the repository at this point in the history
pdist-bootcheck: Don't loop when system disk is full
  • Loading branch information
donald authored Jan 15, 2024
2 parents 6cab7a5 + 178e3ed commit 292efde
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pdist/pdist-bootcheck
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,15 @@ elif [ "$need_pdist_and_reboot" ]; then
rm /var/run/updatecheck.reboot-triggered
exit 1
fi
if (( $(stat -f -c %f /) * $(stat -f -c %s /) /1024/1024/1024 < 10)); then
echo "Update and reboot required but prevented because of insufficient free disk space (<10G)"
exit 1
fi
echo "Update and reboot required"
touch /var/run/updatecheck.reboot-triggered
sync /
while true; do sleep 5; echo "System update in progress. Please be patient..."; done &
netcat $(distmaster) 237
mxgrub default
touch /var/run/updatecheck.reboot-triggered
systemctl start reboot.target --job-mode=replace-irreversibly
fi

0 comments on commit 292efde

Please sign in to comment.