From db638937e81daf4ba01efa81d9fd0cbeb053fcc2 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Wed, 29 Dec 2010 17:34:46 +0100 Subject: Make locale generation and keymap/font setting part of system configuration * remove auto_locale and auto_keymap_font workers, no need for middle-man. * call relevant code directly from prefill_configs, which is now renamed to preconfigure_target * make base procedure run preconfigure_target in configure_system worker. (this also removes the need for the configure_system worker definition in the automatic procedure) * warn user in interactive_configure_system() when preconfigure_target() failed, and allow him to go back * simplify interactive worker_install_packages () a little bit --- src/core/libs/lib-software.sh | 1 - src/core/libs/lib-ui-interactive.sh | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/core/libs') diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh index 467e658..3aee2f7 100644 --- a/src/core/libs/lib-software.sh +++ b/src/core/libs/lib-software.sh @@ -64,7 +64,6 @@ installpkg() { } -# auto_locale(). taken from setup # enable glibc locales from rc.conf and build initial locale DB target_configure_initial_locale() { diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 57cb153..f73c5b8 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -15,10 +15,12 @@ check_depend () show_warning "Cannot Continue. Going back to $2" "You must do $subject first before going here!." && return 1 } -# populate config files with what we know about the system +# populate config and data files with what we know about the target system # note that you could run this function multiple times (i.e. you change some stuff and then come back), # all logic in here is written to do the right thing in that case -prefill_configs () { +preconfigure_target () { + target_configure_initial_locale || return $? + target_configure_initial_keymap_font || return $? target_configure_fstab || return $? execute worker auto_network || return $? # /etc/pacman.d/mirrorlist @@ -83,7 +85,11 @@ interactive_configure_system() seteditor || return 1 FILE="" - prefill_configs + if ! preconfigure_target + then + show_warning "Preconfigure failed" "Beware: I just tried to automatically configure some stuff, but something failed. Please report this. Continue at your own risk" + ask_yesno "Do you want to continue?" no || return 1 + fi # main menu loop while true; do -- cgit v1.2.3-54-g00ecf