Clean temp files before run maco_upgrade
This commit is contained in:
parent
5222bdf3e5
commit
d8c34f6fcc
|
@ -232,6 +232,14 @@ Try to apply Maco upgrade".
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
|
clean_host() { # {{{
|
||||||
|
|
||||||
|
debug_message "clean_host − \
|
||||||
|
Try to clean temp files,…"
|
||||||
|
|
||||||
|
rm -f -- "${MACO_TMP_FILE}" "${MACO_TMP_URGENT_FILE}"
|
||||||
|
}
|
||||||
|
# }}}
|
||||||
main() { # {{{
|
main() { # {{{
|
||||||
|
|
||||||
manage_args "${ARGS}"
|
manage_args "${ARGS}"
|
||||||
|
@ -278,10 +286,12 @@ main() { # {{{
|
||||||
### First, ensure maco.service is enable for next reboot
|
### First, ensure maco.service is enable for next reboot
|
||||||
systemctl --quiet enable maco.service > /dev/null 2>&1
|
systemctl --quiet enable maco.service > /dev/null 2>&1
|
||||||
|
|
||||||
## Then try to upgrade Maco
|
## Then, Maco is ready for upgrade
|
||||||
|
### First clean temp files on the host
|
||||||
|
### And try to upgrade Maco
|
||||||
### If success: exit 0 (leave reboot to maco/atd)
|
### If success: exit 0 (leave reboot to maco/atd)
|
||||||
### Temp files will be automatically cleaned at next startup
|
clean_host \
|
||||||
upgrade_maco \
|
&& upgrade_maco \
|
||||||
&& exit 0
|
&& exit 0
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue