From f0d7557e050bbd3821587e79252eaa26d5bbed72 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Wed, 12 Jul 2023 12:33:00 +0200 Subject: [PATCH] rename functions --- usr/lib/archboot/installer/base.sh | 41 ++++++++++++++++++------------ 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/usr/lib/archboot/installer/base.sh b/usr/lib/archboot/installer/base.sh index 2aaed4bc7..b76554616 100644 --- a/usr/lib/archboot/installer/base.sh +++ b/usr/lib/archboot/installer/base.sh @@ -139,13 +139,33 @@ _set_guid() { fi } -_set_vconsole() { +_configure_vconsole() { if [[ -e /usr/bin/km ]]; then km && _NEXTITEM=1 elif [[ -e /usr/bin/archboot-km.sh ]]; then archboot-km.sh && _NEXTITEM=1 else - _dialog --msgbox "Error:\nkm script not found, aborting console and keyboard setting." 0 0 + _dialog --msgbox "Error:\nkm script not found, aborting console and keyboard configuration." 0 0 + fi +} + +_configure_network() { + if [[ -e /usr/bin/net ]]; then + net && _NEXTITEM="2" + elif [[ -e /usr/bin/archboot-net.sh ]]; then + archboot-tz.sh && _NEXTITEM="2" + else + _dialog --msgbox "Error:\nnet script not found, aborting network configuration" 0 0 + fi +} + +_configure_clock() { + if [[ -e /usr/bin/tz ]]; then + tz && _NEXTITEM="3" + elif [[ -e /usr/bin/archboot-tz.sh ]]; then + archboot-tz.sh && _NEXTITEM="3" + else + _dialog --msgbox "Error:\ntz script not found, aborting clock configuration" 0 0 fi } @@ -167,16 +187,6 @@ _select_source() { _NEXTITEM="4" } -_set_clock() { - if [[ -e /usr/bin/tz ]]; then - tz && _NEXTITEM="3" - elif [[ -e /usr/bin/archboot-tz.sh ]]; then - archboot-tz.sh && _NEXTITEM="3" - else - _dialog --msgbox "Error:\ntz script not found, aborting clock setting" 0 0 - fi -} - _prepare_storagedrive() { _S_MKFSAUTO="" _S_MKFS="" @@ -297,16 +307,15 @@ _mainmenu() { _NEXTITEM="$(cat ${_ANSWER})" case $(cat ${_ANSWER}) in "0") - _set_vconsole ;; + _configure_vconsole ;; "1") if [[ -e "/var/cache/pacman/pkg/archboot.db" ]]; then _abort_local_mode else - _donetwork + _configure_network fi ;; "2") - _set_clock ;; - + _configure_clock ;; "3") if [[ "${_DESTDIR}" == "/" ]]; then _abort_running_system