Finish by rebooting the system

This commit is contained in:
Jeremy Gardais 2020-06-19 10:10:13 +02:00
parent 6af24258ad
commit 23325d2060
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 29 additions and 0 deletions

View File

@ -126,6 +126,30 @@ No Maco upgrade require."
return "${return_maco_upgrade_present}" return "${return_maco_upgrade_present}"
}
# }}}
is_maco_upgrade_absent() { # {{{
return_maco_upgrade_absent="0"
## Check if temp Maco upgrade file is present
if [ -f "${MACO_TMP_FILE}" ]; then
return_maco_upgrade_absent="1"
debug_message "is_maco_upgrade_absent \
Maco upgrade seems available."
## Check if temp Maco urgent upgrade file is present
elif [ -f "${MACO_TMP_URGENT_FILE}" ]; then
return_maco_upgrade_absent="1"
debug_message "is_maco_upgrade_absent \
Maco urgent upgrade seems available."
else
debug_message "is_maco_upgrade_absent \
No Maco upgrade require."
fi
return "${return_maco_upgrade_absent}"
} }
# }}} # }}}
is_queue_enable() { # {{{ is_queue_enable() { # {{{
@ -277,6 +301,11 @@ main() { # {{{
is_maco_upgrade_present \ is_maco_upgrade_present \
&& exit 0 && exit 0
## If Maco upgrade is absent
### Reboot the system
is_maco_upgrade_absent \
&& systemctl reboot
} }
# }}} # }}}