diff --git a/pdist/pdist-bootcheck b/pdist/pdist-bootcheck index a2e7a49..a00eebb 100755 --- a/pdist/pdist-bootcheck +++ b/pdist/pdist-bootcheck @@ -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