diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-11 21:31:00 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-11 21:31:00 +0100 |
commit | 392e855ceae3fc17584761c79a8d0e5616ed088f (patch) | |
tree | 925ed947009493dac3809edcc01a10e958ad2065 /src/core/procedures | |
parent | 906aab0e2fb89e5d0ab128239045b82f5cb3c3a4 (diff) |
first version of new "dependency" checking and tracking (flow control) in core/interactive + better nextitem setting + tmp_fstab fix
Diffstat (limited to 'src/core/procedures')
-rw-r--r-- | src/core/procedures/base | 4 | ||||
-rw-r--r-- | src/core/procedures/interactive | 22 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/core/procedures/base b/src/core/procedures/base index 09c8bd8..9d31441 100644 --- a/src/core/procedures/base +++ b/src/core/procedures/base @@ -99,9 +99,7 @@ worker_install_packages () worker_auto_fstab () { - if [ "$S_MKFS" = "1" -o "$S_MKFSAUTO" = "1" ]; then - target_configure_fstab - fi + target_configure_fstab } diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive index 93aade4..b71049b 100644 --- a/src/core/procedures/interactive +++ b/src/core/procedures/interactive @@ -27,7 +27,10 @@ start_process () ##################### ## begin execution ## - # install stages #TODO: now that exit states of all workers are maintained by the execute function, we can probably simplify this + #TODO: implement check_depend everywhere + #TODO: now that exit states of all workers are maintained by the execute function, we can get rid of this special flow control + + # install stages S_SRC=0 # choose install medium S_NET=0 # network configuration S_CLOCK=0 # clock and timezone @@ -90,19 +93,19 @@ mainmenu() fi [ $ret -eq 0 ] && S_SRC=1 && execute worker runtime_packages ;; "1") - execute worker set_clock && S_CLOCK=1 ;; + execute worker set_clock && S_CLOCK=1 && NEXTITEM=2;; "2") - execute worker prepare_disks ;; # stage set vars set in the worker #TODO: when this is done, default next item is clock? + execute worker prepare_disks && NEXTITEM=3;; # stage set vars set in the worker "3") - execute worker package_list && S_SELECT=1 ;; + check_depend worker prepare_disks && execute worker package_list && S_SELECT=1 && NEXTITEM=4 ;; "4") - execute worker install_packages && S_INSTALL=1 && { execute worker auto_fstab; execute worker auto_network; execute worker auto_locale; } ;; #TODO: next item is again install packages + check_depend worker package_list && execute worker install_packages && S_INSTALL=1 && { execute worker auto_fstab; execute worker auto_network; execute worker auto_locale; } && NEXITITEM=5 ;; "5") - execute worker configure_system && S_CONFIG=1 && { execute worker mkinitcpio; execute worker locales; } ;; + check_depend worker install_packages && execute worker configure_system && S_CONFIG=1 && { execute worker mkinitcpio; execute worker locales; } && NEXTITEM=6 ;; "6") - execute worker install_bootloader && S_BOOT=1 ;; + execute worker install_bootloader && S_BOOT=1 && NEXTITEM=7 ;; "7") - notify "If the install finished successfully, you can now type 'reboot' to restart the system." && stop_installer ;; + notify "If the install finished successfully, you can now type 'reboot' to restart the system." && stop_installer ;; *) ask_yesno "Abort Installation?" && stop_installer ;; esac @@ -174,7 +177,8 @@ worker_prepare_disks() DONE=1 ;; esac done - NEXTITEM="1" + [ $S_MKFSAUTO -eq 1 -o $S_MKFS -eq 1 -a $S_PART -eq 1 ] && return 0 + return 1 } |