Skip to content

Commit

Permalink
Merge pull request #461 from mariux64/fix-pdist-rebootloop
Browse files Browse the repository at this point in the history
pdist-bootcheck: Use persistent directory as safeguard
  • Loading branch information
donald authored May 6, 2025
2 parents e70918b + d4db813 commit 1ae815d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pdist/pdist-bootcheck
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ if [ "$need_async_pdist" ]; then
netcat $(distmaster) 237
echo triggered background update
elif [ "$need_pdist_and_reboot" ]; then
if [[ -e /var/run/updatecheck.reboot-triggered ]]; then
if [[ -e /var/cache/updatecheck.reboot-triggered ]]; then
echo "Update and reboot required but prevented due to previous attempt"
rm /var/run/updatecheck.reboot-triggered
rm /var/cache/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
touch /var/cache/updatecheck.reboot-triggered
sync /
while true; do sleep 5; echo "System update in progress. Please be patient..."; done &
netcat $(distmaster) 237
Expand Down

0 comments on commit 1ae815d

Please sign in to comment.