summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/libs/lib-ui-interactive.sh18
-rw-r--r--src/core/procedures/automatic13
-rw-r--r--src/core/procedures/base9
-rw-r--r--src/core/procedures/interactive36
4 files changed, 25 insertions, 51 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 93e5bae..329ef5d 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -1212,7 +1212,6 @@ EOF
}
-# select_source(). taken from setup.
# displays installation source selection menu
# and sets up relevant config files
#
@@ -1249,9 +1248,7 @@ interactive_select_source()
}
-# select_mirror(). taken from setup.
# Prompt user for preferred mirror and set $var_SYNC_URL
-#
# args: none
# returns: nothing
interactive_select_mirror() {
@@ -1271,18 +1268,3 @@ interactive_select_mirror() {
fi
echo "Using mirror: $var_SYNC_URL" >$LOG
}
-
-select_source_extras_menu ()
-{
- while true; do
- default=no
- [ -n "$NEXTITEM" ] && default="$NEXTITEM"
- ask_option $default "NET (HTTP/FTP) Installation" "Make sure the network is ok and you've selected a mirror before continuing the installer" required \
- "1" "$worker_runtime_network_title" \
- "2" "$worker_select_mirror_title" \
- "3" "Return to Main Menu" || return 1
- [ "$ANSWER_OPTION" = 1 ] && execute worker runtime_network && NEXTITEM=2
- [ "$ANSWER_OPTION" = 2 ] && execute worker select_mirror && NEXTITEM=3
- [ "$ANSWER_OPTION" = 3 ] && break
- done
-}
diff --git a/src/core/procedures/automatic b/src/core/procedures/automatic
index 1f67f66..4fba65b 100644
--- a/src/core/procedures/automatic
+++ b/src/core/procedures/automatic
@@ -66,19 +66,6 @@ worker_select_source ()
var_SYNC_URL=${SYNC_URL:-}
}
-worker_runtime_network ()
-{
- true # for now. we assume the user has taken care of this himself already. doing this interactively wouldn't be a good default anyway.
- # maybe check if network works, if not, try dhcp. let user override by using a static config in his config file
- #if ask_yesno "Do you want to (re)-configure your networking?"
- #then
- # interactive_runtime_network
- #else
- # inform "Ok. skipping network config"
- #fi
-}
-
-
worker_prepare_disks ()
{
get_possible_fs
diff --git a/src/core/procedures/base b/src/core/procedures/base
index cf37483..099beeb 100644
--- a/src/core/procedures/base
+++ b/src/core/procedures/base
@@ -68,19 +68,12 @@ worker_select_source ()
var_PKG_SOURCE_TYPE='cd'
var_FILE_URL="file:///src/core/pkg"
var_SYNC_URL= # optional, points to a repository string something like ftp://ftp.belnet.be/mirror/archlinux.org/$repo/os/i686 (eg the same format as what you find in /etc/pacman.conf)
- # if you override var_PKG_SOURCE_TYPE to 'net' (or ask user and he chooses ftp) don't forget to configure the network and to select_mirrors
-}
-
-
-worker_select_source_extras_menu ()
-{
- select_source_extras_menu
}
worker_runtime_network ()
{
- #network is assumed to be functional for now because we do it first with /arch/setup. once that falls away, we'll need to implement it here
+ #override if needed
true
}
diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive
index a01e13d..cf2b214 100644
--- a/src/core/procedures/interactive
+++ b/src/core/procedures/interactive
@@ -18,7 +18,6 @@ declare -A workertitles
workertitles['select_source']='Select source'
workertitles['set_editor']='Set editor'
workertitles['runtime_network']='Setup network'
-workertitles['select_mirror']='Select mirror'
workertitles['set_clock']='Set clock'
workertitles['prepare_disks']='Prepare hard drive(s)'
workertitles['package_list']='Select packages'
@@ -64,8 +63,7 @@ mainmenu()
ask_option $default "MAIN MENU" '' required "${menu[@]}"
case $ANSWER_OPTION in
"1")
- execute worker select_source; local ret=$?; [ $ret -eq 0 -a "$var_PKG_SOURCE_TYPE" = net ] && execute worker select_source_extras_menu
- [ $ret -eq 0 ] && execute worker runtime_packages && NEXTITEM=2 ;;
+ execute worker select_source && execute worker runtime_packages && NEXTITEM=2 ;;
"2")
execute worker set_editor && NEXTITEM=3 ;;
@@ -111,8 +109,29 @@ worker_prepare_disks()
worker_select_source ()
{
- #TODO: how to handle user going here again? discard previous settings, warn him that he already done it?
- interactive_select_source && return 0
+ interactive_select_source
+ local ret=$?;
+ if [ $ret -eq 0 -a "$var_PKG_SOURCE_TYPE" = net ]
+ then
+ select_source_extras_menu || ret=$?
+ fi
+ # base/automatic procedure run a worker runtime_repositories, maybe we could do an interactive repo adder
+ return $ret
+}
+
+select_source_extras_menu ()
+{
+ while true; do
+ default=no
+ [ -n "$NEXTITEM" ] && default="$NEXTITEM"
+ ask_option $default "NET (HTTP/FTP) Installation" "Make sure the network is ok and you've selected a mirror before continuing the installer" required \
+ "1" "${worker_titles['runtime_network']}" \
+ "2" "Select mirror" \
+ "3" "Return to Main Menu" || return 1
+ [ "$ANSWER_OPTION" = 1 ] && execute worker runtime_network && NEXTITEM=2
+ [ "$ANSWER_OPTION" = 2 ] && interactive_select_mirror && NEXTITEM=3
+ [ "$ANSWER_OPTION" = 3 ] && break
+ done
return 1
}
@@ -161,13 +180,6 @@ worker_runtime_network() {
interactive_runtime_network
}
-
-worker_select_mirror ()
-{
- interactive_select_mirror
-}
-
-
worker_install_bootloader ()
{
interactive_install_bootloader