diff --git a/usr/bin/archboot-launcher.sh b/usr/bin/archboot-launcher.sh index acb3faf87..ce27cb975 100755 --- a/usr/bin/archboot-launcher.sh +++ b/usr/bin/archboot-launcher.sh @@ -66,14 +66,7 @@ _manage() { if [[ "${_EXIT}" == "FULL" ]]; then update -full-system elif [[ "${_EXIT}" == "UPDATE" ]]; then - clear - echo -e "\e[93mGo and get a cup of coffee. Depending on your system setup,\e[m" - echo -e "\e[93myou can \e[1mstart\e[m\e[93m with your tasks in about \e[1m5\e[m\e[93m minutes...\e[m" - if update | grep -q latest-install; then - update -latest-install - else - update -latest - fi + _run_update_environment elif [[ "${_EXIT}" == "IMAGE" ]]; then update -latest-image fi diff --git a/usr/bin/archboot-pacsetup.sh b/usr/bin/archboot-pacsetup.sh index ceab51cc8..17add0971 100755 --- a/usr/bin/archboot-pacsetup.sh +++ b/usr/bin/archboot-pacsetup.sh @@ -106,14 +106,7 @@ _update_environment() { else _dialog --title " New Kernel Available " --defaultno --yesno "Do you want to update the Archboot Environment to ${_ONLINE_KERNEL}?\n\nATTENTION:\nThis will reboot the system using kexec!" 9 60 && _UPDATE_ENVIRONMENT=1 if [[ -n "${_UPDATE_ENVIRONMENT}" ]]; then - clear - echo -e "\e[93mGo and get a cup of coffee. Depending on your system setup,\e[m" - echo -e "\e[93myou can \e[1mstart\e[m\e[93m with your tasks in about \e[1m5\e[m\e[93m minutes...\e[m" - if update | grep -q latest-install; then - update -latest-install - else - update -latest - fi + _run_update_environment fi fi fi diff --git a/usr/lib/archboot/basic-common.sh b/usr/lib/archboot/basic-common.sh index 5dd9466ae..86b808b8d 100644 --- a/usr/lib/archboot/basic-common.sh +++ b/usr/lib/archboot/basic-common.sh @@ -48,4 +48,15 @@ _cleanup() { clear exit 0 } + +_run_update_environment() { + clear + echo -e "\e[93mGo and get a cup of coffee. Depending on your system setup,\e[m" + echo -e "\e[93myou can \e[1mstart\e[m\e[93m with your tasks in about \e[1m5\e[m\e[93m minutes...\e[m" + if update | grep -q latest-install; then + update -latest-install + else + update -latest + fi +} # vim: set ft=sh ts=4 sw=4 et: