summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-ui-interactive.sh
diff options
context:
space:
mode:
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
}