summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-ui-interactive.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-29 18:08:49 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-29 18:08:49 +0100
commit846471086b3c581619eeda5ad706475a1a17ddf9 (patch)
tree6eea91278f4ac1a2eea7c3d826ab3a8214bb49cc /src/core/libs/lib-ui-interactive.sh
parentd363589e1a55874d3eb9abade701d61ea1f085b7 (diff)
refactor locale, initcpio and initialtime code
* remove locale, initcpio and initialtime workers, move logic in new postconfigure_target function * for base and automatic procedures, postconfigure_target() gets called automatically * interactive procedure calls this in interactive_configure_system in the same way it calls preconfigure_target * rename target_run_mkinitcpio to target_run_mkinitcpio, to be consistent with other functions
Diffstat (limited to 'src/core/libs/lib-ui-interactive.sh')
-rw-r--r--src/core/libs/lib-ui-interactive.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index f73c5b8..2aea25b 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -80,6 +80,14 @@ preconfigure_target () {
# TODO: we should probably update /etc/crypttab if the user has non-/ encrypted disks.
}
+# do some target configuration steps automatically, after user decided he configured his system.
+# as usual, this function is okay with being called multiple times
+postconfigure_target () {
+ target_run_mkinitcpio || return $?
+ target_locale-gen || return $?
+ cp /etc/localtime ${var_TARGET_DIR}/etc/localtime || return $?
+}
+
interactive_configure_system()
{
seteditor || return 1
@@ -139,6 +147,12 @@ interactive_configure_system()
# temporary backup files are not useful anymore past this point.
find "${var_TARGET_DIR}/etc/" -name '*~' -delete &>/dev/null
+ if ! postconfigure_target
+ then
+ show_warning "Postconfigure 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
+
return 0
}