diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-12 19:40:46 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-12 19:40:46 +0100 |
commit | cc8da1929e18b64fb5fa72c82090a09fee37ea0f (patch) | |
tree | 9dcd1dfc6a7f1c91c5f76c9829751bcc7022964e /src | |
parent | e4a5db7f3500b3706a479133b8d7b1465a570da5 (diff) |
various cleanups
Diffstat (limited to 'src')
-rw-r--r-- | src/core/procedures/interactive | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive index beef676..40847e7 100644 --- a/src/core/procedures/interactive +++ b/src/core/procedures/interactive @@ -71,19 +71,8 @@ mainmenu() NEXTITEM="$ANSWER_OPTION" #TODO: set next item always current+1 after succesfull finish of each phase/worker, if relevant case $ANSWER_OPTION in "0") - execute worker select_source; ret=$? - if [ $ret -eq 0 -a "$var_PKG_SOURCE_TYPE" = "ftp" ]; then - while true; do - ask_option no "FTP Installation" \ - "0" "$worker_runtime_network_title" \ - "1" "$worker_select_mirror_title" \ - "2" "Return to Main Menu" - [ "$ANSWER_OPTION" = 0 ] && execute worker runtime_network - [ "$ANSWER_OPTION" = 1 ] && execute worker select_mirror - [ "$ANSWER_OPTION" = 2 ] && break - done - fi - [ $ret -eq 0 ] && execute worker runtime_packages && NEXTITEM=1 ;; + execute worker select_source; ret=$?; [ $ret -eq 0 -a "$var_PKG_SOURCE_TYPE" = ftp ] && select_source_extras_menu + [ $ret -eq 0 ] && execute worker runtime_packages && NEXTITEM=1 ;; "1") execute worker set_clock && NEXTITEM=2 ;; @@ -109,11 +98,24 @@ mainmenu() } +select_source_extras_menu () +{ + while true; do + ask_option no "FTP Installation" \ + "0" "$worker_runtime_network_title" \ + "1" "$worker_select_mirror_title" \ + "2" "Return to Main Menu" + [ "$ANSWER_OPTION" = 0 ] && execute worker runtime_network + [ "$ANSWER_OPTION" = 1 ] && execute worker select_mirror + [ "$ANSWER_OPTION" = 2 ] && break + done +} + worker_configure_system() { ## PREPROCESSING ## - #TODO: only need to do this once. check 'ended_ok worker configure_system' is not good because this could be done already, yet worker did not exit 0 + #TODO: only need to do this once. check 'ended_ok worker configure_system' is not good because this could be done already even if worker did not exit 0 # /etc/pacman.d/mirrorlist # add installer-selected mirror to the top of the mirrorlist if [ "$var_PKG_SOURCE_TYPE" = "ftp" -a "${SYNC_URL}" != "" ]; then @@ -141,17 +143,16 @@ worker_prepare_disks() while [ "$DONE" = "0" ] do - DEFAULT="" - [ -n "$NEXTITEM" ] && DEFAULT="--default-item $NEXTITEM" + default=no + [ -n "$NEXTITEM" ] && default="$NEXTITEM" + ask_option $default "Prepare Hard Drive" \ + "1" "Auto-Prepare (erases the ENTIRE hard drive and sets up partitions and filesystems)" \ + "2" "Partition Hard Drives" \ + "3" "Set Filesystem Mountpoints" \ + "4" "Return to Main Menu" - _dia_DIALOG $DEFAULT --menu "Prepare Hard Drive" 12 60 5 \ - "1" "Auto-Prepare (erases the ENTIRE hard drive and sets up partitions and filesystems)" \ - "2" "Partition Hard Drives" \ - "3" "Set Filesystem Mountpoints" \ - "4" "Return to Main Menu" 2>$ANSWER - NEXTITEM="$(cat $ANSWER)" - case $(cat $ANSWER) in + case $ANSWER_OPTION in "1") interactive_autoprepare && NEXTITEM=4 && ret=0 && DISK_CONFIG_TYPE=auto;; #TODO: for some reason. if this completes $?=0, next item will be 1 :/ "2") @@ -195,7 +196,6 @@ worker_select_source () } - # select_packages() # prompts the user to select packages to install worker_package_list() { |