summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/libs/lib-software.sh3
-rw-r--r--src/core/libs/lib-ui-interactive.sh14
-rw-r--r--src/core/procedures/automatic2
-rw-r--r--src/core/procedures/base21
-rw-r--r--src/core/procedures/interactive5
5 files changed, 18 insertions, 27 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
}
diff --git a/src/core/procedures/automatic b/src/core/procedures/automatic
index a61468a..ba533fa 100644
--- a/src/core/procedures/automatic
+++ b/src/core/procedures/automatic
@@ -6,7 +6,7 @@
# It should be:
# phase_preparation=(configure intro sysprep select_source runtime_network runtime_repositories runtime_packages)
# phase_basics=(set_clock prepare_disks)
-# phase_system=(package_list install_packages configure_system mkinitcpio locales install_bootloader)
+# phase_system=(package_list install_packages configure_system install_bootloader)
# phase_finish=(msg_report)
# In theory, the only manual thing should maybe be configuring the runtime network and putting the configfile in place
diff --git a/src/core/procedures/base b/src/core/procedures/base
index e2d470d..68a91ee 100644
--- a/src/core/procedures/base
+++ b/src/core/procedures/base
@@ -29,8 +29,6 @@ phase_system=(\
package_list \
install_packages \
configure_system \
- mkinitcpio \
- locales \
install_bootloader)
phase_finish=(msg_report)
@@ -158,24 +156,7 @@ worker_auto_network ()
worker_configure_system ()
{
preconfigure_target
-}
-
-
-worker_mkinitcpio ()
-{
- run_mkinitcpio
-}
-
-
-worker_locales ()
-{
- target_locale-gen
-}
-
-
-worker_initialtime ()
-{
- cp /etc/localtime ${var_TARGET_DIR}/etc/localtime
+ postconfigure_target
}
diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive
index 77e17a4..bac495c 100644
--- a/src/core/procedures/interactive
+++ b/src/core/procedures/interactive
@@ -74,10 +74,7 @@ mainmenu()
check_depend worker package_list && \
check_depend worker select_source && execute worker install_packages && default=7 ;;
"7")
- check_depend worker install_packages && execute worker configure_system && { execute worker mkinitcpio ; \
- execute worker locales ;
- execute worker initialtime ;
- true ; } && default=8 ;;
+ check_depend worker install_packages && execute worker configure_system && default=8 ;;
"8")
check_depend worker configure_system && execute worker install_bootloader && default=9 ;;
"9")