summaryrefslogtreecommitdiff
path: root/src/core/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/libs')
-rw-r--r--src/core/libs/lib-software.sh3
-rw-r--r--src/core/libs/lib-ui-interactive.sh14
2 files changed, 15 insertions, 2 deletions
diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh
index 3aee2f7..4e32a63 100644
--- a/src/core/libs/lib-software.sh
+++ b/src/core/libs/lib-software.sh
@@ -3,9 +3,8 @@
TMP_MKINITCPIO_LOG=$LOG_DIR/mkinitcpio.log
TMP_PACMAN_LOG=$LOG_DIR/pacman.log
-# run_mkinitcpio() taken from setup. adapted a lot
# runs mkinitcpio on the target system, displays output
-run_mkinitcpio()
+target_run_mkinitcpio()
{
target_special_fs on
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
}