mirror of
https://github.com/Luzifer/arch-update.git
synced 2024-12-20 19:11:16 +00:00
Prevent to kill the script with reboot
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
763a2d1cc0
commit
f74001af41
2 changed files with 4 additions and 4 deletions
2
PKGBUILD
2
PKGBUILD
|
@ -13,7 +13,7 @@ source=(
|
||||||
arch-update.service
|
arch-update.service
|
||||||
arch-update.timer
|
arch-update.timer
|
||||||
)
|
)
|
||||||
sha512sums=('a9af1a85dc0adde7cffdb3544ca6b4e18ce129683f5bfdcdfda9c954d759f909c05e1716b9beda50f4f15104047cdae18f25897090baf7118c35f7d0b5c82cfd'
|
sha512sums=('504593f8595ab86575d1d40547e8f143f8d2ee53f0f35469de267e6d6e1b0cb4b5c3569b813203898dd51884339eaa43b68be7110dee014969b7ead0dfd93d4d'
|
||||||
'384a9fc9c7f43bd7e9ec9274b5e930e7e9e3dcea088f524201f0b359f33e470b9b120b6c261b82b2d484d7af937eb67ba2cdf7a0bda2ca424338da03e008a716'
|
'384a9fc9c7f43bd7e9ec9274b5e930e7e9e3dcea088f524201f0b359f33e470b9b120b6c261b82b2d484d7af937eb67ba2cdf7a0bda2ca424338da03e008a716'
|
||||||
'f9b62fbc31d963525340c408ddacf671c54d9874b4decd1c84286b2a000ef488a85d738f7a3d83db34e9dd98baa84389aff837bdf68531712ba9eaa7a8d762bd')
|
'f9b62fbc31d963525340c408ddacf671c54d9874b4decd1c84286b2a000ef488a85d738f7a3d83db34e9dd98baa84389aff837bdf68531712ba9eaa7a8d762bd')
|
||||||
|
|
||||||
|
|
|
@ -123,8 +123,8 @@ function main() { # ( )
|
||||||
# If enabled and required do a reboot
|
# If enabled and required do a reboot
|
||||||
if [ ${#needs_reboot[@]} -gt 0 ]; then
|
if [ ${#needs_reboot[@]} -gt 0 ]; then
|
||||||
if [ $REBOOT -eq 1 ]; then
|
if [ $REBOOT -eq 1 ]; then
|
||||||
info "Reboot will be executed now"
|
info "Reboot will be executed in 1 minute"
|
||||||
reboot
|
shutdown -r +1 # Give the script enough time to finish and queue reboot
|
||||||
exit 0 # Do not execute more of this script
|
exit 0 # Do not execute more of this script
|
||||||
else
|
else
|
||||||
warn "Reboot is strongly suggested but auto-reboot is disabled"
|
warn "Reboot is strongly suggested but auto-reboot is disabled"
|
||||||
|
|
Loading…
Reference in a new issue