From d25f9a872da77c1916705ff711c2932e8a0ec0ef Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Tue, 28 Dec 2010 22:27:42 +0100 Subject: Make auto_network worker part of prefill_configs() Make prefill_configs invoke auto_network worker, this makes more sense, and the separate procedures don't need to worry about it anymore. --- README | 4 +++- src/core/libs/lib-ui-interactive.sh | 1 + src/core/procedures/automatic | 8 +------- src/core/procedures/base | 1 - src/core/procedures/interactive | 3 +-- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/README b/README index 76fbb0e..782632b 100644 --- a/README +++ b/README @@ -145,7 +145,9 @@ Notes: - you _must_ specify a procedure, to avoid errors. take 'interactive' if unsure - don't edit the base procedure (or any other core item), rather make your own. It's easy! - you're not supposed to define new phases. just override them. logic goes in workers/libariers - + - workers and phases are pretty regular functions, except that they are invoked through a wrapper (the `execute` function), which tracks the exitcodes + this allows to get reports at the end of the install showing which steps completed successfully and where things failed. Other then that, there is nothing + special about them. It is even possible to have your workers function as a callback by having library functions invoking them. ** Extending AIF ** diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index ae877ad..93e5bae 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -20,6 +20,7 @@ check_depend () # all logic in here is written to do the right thing in that case prefill_configs () { target_configure_fstab || return $? + execute worker auto_network || return $? # /etc/pacman.d/mirrorlist # add installer-selected mirror to the top of the mirrorlist, unless it's already at the top. previously added mirrors are kept (a bit lower), you never know.. if [ "$var_PKG_SOURCE_TYPE" = "net" -a -n "${var_SYNC_URL}" ]; then diff --git a/src/core/procedures/automatic b/src/core/procedures/automatic index 5f6f336..1f67f66 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 auto_network auto_locale auto_keymap_font configure_system mkinitcpio locales install_bootloader) +# phase_system=(package_list install_packages auto_locale auto_keymap_font configure_system mkinitcpio locales 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 @@ -121,12 +121,6 @@ worker_set_clock () } -worker_auto_network () { - #TODO implement this - true -} - - worker_configure_system () { prefill_configs } diff --git a/src/core/procedures/base b/src/core/procedures/base index dd05773..cf37483 100644 --- a/src/core/procedures/base +++ b/src/core/procedures/base @@ -28,7 +28,6 @@ phase_basics=(\ phase_system=(\ package_list \ install_packages \ - auto_network \ auto_locale \ auto_keymap_font \ configure_system \ diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive index 03b9c1a..a01e13d 100644 --- a/src/core/procedures/interactive +++ b/src/core/procedures/interactive @@ -82,8 +82,7 @@ mainmenu() execute worker auto_keymap_font; true ; } && NEXTITEM=7 ;; "7") - check_depend worker install_packages && execute worker auto_network && \ - execute worker configure_system && { execute worker mkinitcpio ; \ + check_depend worker install_packages && execute worker configure_system && { execute worker mkinitcpio ; \ execute worker locales ; execute worker initialtime ; true ; } && NEXTITEM=8 ;; -- cgit v1.2.3