disable network and source selection in offline mode

This commit is contained in:
Tobias Powalowski 2023-06-27 23:41:36 +02:00
parent 89424d9f73
commit e9028f3cf7

View file

@ -62,6 +62,10 @@ _abort_running_system() {
_dialog --msgbox "This function is not available on System Setup Mode." 5 60 _dialog --msgbox "This function is not available on System Setup Mode." 5 60
} }
_abort_offline_mode() {
_dialog --msgbox "This function is not available on Offline Mode." 5 60
}
_geteditor() { _geteditor() {
if ! [[ "${_EDITOR}" ]]; then if ! [[ "${_EDITOR}" ]]; then
_dialog --menu "Select A Text Editor" 9 35 3 \ _dialog --menu "Select A Text Editor" 9 35 3 \
@ -295,10 +299,16 @@ _mainmenu() {
"0") "0")
_set_vconsole ;; _set_vconsole ;;
"1") "1")
_donetwork ;; if [[ -e "/var/cache/pacman/pkg/archboot.db" ]]; then
_abort_offline_mode
else
_donetwork
fi ;;
"2") "2")
if [[ "${_DESTDIR}" == "/" ]]; then if [[ "${_DESTDIR}" == "/" ]]; then
_abort_running_system _abort_running_system
elif [[ -e "/var/cache/pacman/pkg/archboot.db" ]]; then
_abort_offline_mode
else else
_select_source || return 1 _select_source || return 1
_update_environment _update_environment