Skip to content

Commit

Permalink
Make the reboot countdown after a kernel upgrade showing remaining se…
Browse files Browse the repository at this point in the history
…conds in real time

This commit makes the 5 seconds countdow before a reboot to apply a pending kernel update show the remaining seconds in real time.
  • Loading branch information
Antiz96 committed May 19, 2024
1 parent 8a850eb commit 7e3fcdb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/script/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,11 @@ kernel_reboot() {
case "${answer}" in
"$(eval_gettext "Y")"|"$(eval_gettext "y")")
echo
main_msg "$(eval_gettext "Rebooting in 5 seconds...\nPress ctrl+c to abort")"
sleep 5
for sec in {5..1}; do
main_msg "$(eval_gettext "Rebooting in ${sec}...\r")"
sleep 1
done

if ! reboot; then
echo
error_msg "$(eval_gettext "An error has occurred during the reboot process\nThe reboot has been aborted\n")" && quit_msg
Expand Down

0 comments on commit 7e3fcdb

Please sign in to comment.