summaryrefslogtreecommitdiff
path: root/src/core/procedures
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/procedures')
-rw-r--r--src/core/procedures/automatic13
-rw-r--r--src/core/procedures/base9
-rw-r--r--src/core/procedures/interactive36
3 files changed, 25 insertions, 33 deletions
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