summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-ui-interactive.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/libs/lib-ui-interactive.sh')
-rw-r--r--src/core/libs/lib-ui-interactive.sh199
1 files changed, 128 insertions, 71 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index cb79893..f765d59 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -19,7 +19,10 @@ check_depend ()
interactive_configure_system()
{
- [ "$EDITOR" ] || interactive_get_editor
+ if [ -z "$EDITOR" ]
+ then
+ interactive_get_editor || return 1
+ fi
FILE=""
## PREPROCESSING ##
@@ -27,7 +30,7 @@ interactive_configure_system()
#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 "${var_SYNC_URL}" != "" ]; then
+ if [ "$var_PKG_SOURCE_TYPE" = "net" -a "${var_SYNC_URL}" != "" ]; then
debug 'PROCEDURE' "Adding choosen mirror (${var_SYNC_URL}) to ${var_TARGET_DIR}/$var_MIRRORLIST"
mirrorlist=`awk "BEGIN { printf(\"# Mirror used during installation\nServer = "${var_SYNC_URL}"\n\n\") } 1 " "${var_TARGET_DIR}/$var_MIRRORLIST"`
echo "$mirrorlist" > "${var_TARGET_DIR}/$var_MIRRORLIST" #TODO: test this, this may not work
@@ -40,12 +43,32 @@ interactive_configure_system()
-e "s/^HARDWARECLOCK=.*/HARDWARECLOCK=\"$HARDWARECLOCK\"/g" \
${var_TARGET_DIR}/etc/rc.conf
+ # prepare HOOKS in mkinitcpio.conf for lvm/dm_crypt users
+ if get_anchestors_mount ';/;'
+ then
+ hooks=`echo "$ANSWER_DEVICES" | cut -d ' ' -f2 | egrep 'lvm-lv|dm_crypt' | sed -e 's/lvm-lv/lvm2/' -e 's/dm_crypt/encrypt/' | tac`
+ hooks=`echo $hooks`
+ [ -n "$hooks" ] && sed -i "/^HOOKS/ s/filesystems/$hooks filesystems/" ${var_TARGET_DIR}/etc/mkinitcpio.conf
+ fi
+ # if keymap/usbinput are not in mkinitcpio.conf, but encrypt is, we should probably add it
+ if line=`grep ^HOOKS ${var_TARGET_DIR}/etc/mkinitcpio.conf | grep encrypt`
+ then
+ if ! echo "$line" | grep -q keymap
+ then
+ sed -i '/^HOOKS/ s/encrypt/keymap encrypt/' ${var_TARGET_DIR}/etc/mkinitcpio.conf
+ fi
+ if ! echo "$line" | grep -q usbinput
+ then
+ sed -i '/^HOOKS/ s/keymap/usbinput keymap/' ${var_TARGET_DIR}/etc/mkinitcpio.conf
+ fi
+ fi
+
# main menu loop
while true; do
DEFAULT=no
[ -n "$FILE" ] && DEFAULT="$FILE"
- helptext="Note that if you want to change any file not listed here (unlikely) you can go to another tty and update ${var_TARGET_DIR}/etc/<filename> yourself"
- grep -q '^/dev/mapper' $TMP_FSTAB && helptext="$helptext\nDon't forget to add the appropriate modules for your /dev/mapper devices to mkinitcpio.conf" #TODO: we can improve this a bit
+ helptext="\nNote that if you want to change any file not listed here (unlikely) you can go to another tty and update ${var_TARGET_DIR}/etc/<filename> yourself"
+ grep -q '^/dev/mapper' $TMP_FSTAB && helptext="$helptext\n/dev/mapper/ users: Pay attention to HOOKS in mkinitcpio.conf"
ask_option $DEFAULT "Configuration" "$helptext" required \
"/etc/rc.conf" "System Config" \
"/etc/fstab" "Filesystem Mountpoints" \
@@ -123,7 +146,7 @@ interactive_time () {
type ntpdate &>/dev/null && EXTRA=('ntp' 'Set time and date using ntp')
ask_option $default "Date/time configuration" "According to your settings and your hardwareclock, the date should now be $current. If this is incorrect, you can correct this now" required \
- "${EXTRA[@]}" "manual" "Set time and date manually" "return" "Looks good. back to main menu"
+ "${EXTRA[@]}" "manual" "Set time and date manually" "return" "Looks good. back to main menu" || return 1
if [ "$ANSWER_OPTION" = ntp ]
then
if ntpdate pool.ntp.org >/dev/null
@@ -152,7 +175,7 @@ interactive_time () {
interactive_prepare_disks ()
{
DONE=0
- ret=1 # 1 means unsuccessful. 0 for ok
+ local ret=1 # 1 means unsuccessful. 0 for ok
NEXTITEM=
DISK_CONFIG_TYPE=
[ "$BLOCK_ROLLBACK_USELESS" = "0" ] && show_warning "Rollback may be needed" "It seems you already went here. You should probably rollback previous changes before reformatting, otherwise stuff will probably fail"
@@ -165,11 +188,11 @@ interactive_prepare_disks ()
#TODO: inform user (using dialog's --item-help or so) that autoprepare uses 1 disk and uses it in a "fairly regular" (though somewhat customizable) manner.
ask_option $default "Prepare Hard Drive" '' required \
- "1" "Auto-Prepare (erases the ENTIRE hard drive and sets up partitions and filesystems)" \
- "2" "Partition Hard Drives" \
- "3" "Configure block devices, filesystems and mountpoints" \
+ "1" "Auto-Prepare (erases an ENTIRE hard drive and sets up partitions, filesystems and mountpoints)" \
+ "2" "Manually Partition Hard Drives" \
+ "3" "Manually Configure block devices, filesystems and mountpoints" \
"4" "Rollback last filesystem changes$rollbackstr" \
- "5" "Return to Main Menu"
+ "5" "Return to Main Menu" || return 1
case $ANSWER_OPTION in
"1")
@@ -199,7 +222,7 @@ interactive_prepare_disks ()
fi
fi
;;
- *)
+ "5")
DONE=1 ;;
esac
done
@@ -354,8 +377,8 @@ interactive_filesystem ()
local old_fs_label=$fs_label
local old_fs_params=$fs_params
- ask_option edit "Alter this $fs_type filesystem on $part ?" \
- "Alter $fs_type filesystem (label:$fs_label, mountpoint:$fs_mountpoint) on $part (type:$part_type, label:$part_label) ?" required \
+ ask_option edit "Change $fs_type filesystem settings on $part ?" \
+ "Change $fs_type filesystem settings (create:$fs_create, label:$fs_label, mountpoint:$fs_mountpoint) on $part (type:$part_type, label:$part_label) ?" required \
edit EDIT delete DELETE #TODO: nicer display if label is empty etc
# Don't alter, and return if user cancels
@@ -367,7 +390,6 @@ interactive_filesystem ()
if [ "$NEW_FILESYSTEM" != no_fs ]
then
# Possible filesystems/software layers on partitions/block devices
-
# name on top of mountpoint? label? DM device? theoretical device? opts? special params?
# swap raw/lvm-lv/dm_crypt no no no no no no
@@ -399,6 +421,9 @@ interactive_filesystem ()
[ $part_type = lvm-vg ] && which `get_filesystem_program lvm-lv` &>/dev/null && FSOPTS="$FSOPTS lvm-lv LVM_Logical_Volume"
[ $part_type = raw -o $part_type = lvm-lv ] && which `get_filesystem_program dm_crypt` &>/dev/null && FSOPTS="$FSOPTS dm_crypt DM_crypt_Volume"
+ fs_create=no
+ ask_yesno "Do you want to have this filesystem re(created) ? If not, make sure there already is a filesystem!" && fs_create=yes
+
# determine FS
fsopts=($FSOPTS);
if [ ${#fsopts[*]} -lt 4 ] # less then 4 words in the $FSOPTS string. eg only one option
@@ -408,7 +433,9 @@ interactive_filesystem ()
else
default=
[ -n "$fs_type" ] && default="--default-item $fs_type"
- ask_option no "Select filesystem" "Select a filesystem for $part:" required $FSOPTS || return 1
+ extratext="Select a filesystem for $part:"
+ [ "$fs_create" == no ] && extratext="Select which filesystem $part is. Make sure you get this right" #otherwise he'll be screwed when we try to mount it :)
+ ask_option no "Select filesystem" "$extratext" required $FSOPTS || return 1
fs_type=$ANSWER_OPTION
fi
@@ -427,7 +454,7 @@ interactive_filesystem ()
fi
# ask label, if relevant
- if [ "$fs_type" = lvm-vg -o "$fs_type" = lvm-lv -o "$fs_type" = dm_crypt ]
+ if [ "$fs_create" == yes ] && [ "$fs_type" = lvm-vg -o "$fs_type" = lvm-lv -o "$fs_type" = dm_crypt ]
then
default=
[ -n "$fs_label" ] && default="$fs_label"
@@ -436,7 +463,7 @@ interactive_filesystem ()
fi
# ask special params, if relevant
- if [ "$fs_type" = lvm-vg ]
+ if [ "$fs_create" == yes ] && [ "$fs_type" = lvm-vg ]
then
# add $part to $fs_params if it's not in there because the user wants this enabled by default. TODO: we should find something out so you can't disable $part. (would be weird to have a vg listed on $part and not have $part it fs_params)
pv=${part/+/}
@@ -460,7 +487,7 @@ interactive_filesystem ()
fs_params="$(sed 's/ /:/' <<< "$ANSWER_CHECKLIST")" #replace spaces by colon's, we cannot have spaces anywhere in any string
fi
fi
- if [ "$fs_type" = lvm-lv ]
+ if [ "$fs_create" == yes ] && [ "$fs_type" = lvm-lv ]
then
[ -z "$fs_params" ] && default='5000'
[ -n "$fs_params" ] && default="$fs_params"
@@ -468,7 +495,7 @@ interactive_filesystem ()
# Lvm tools use binary units but have their own suffixes ( K,M,G,T,P,E, but they mean KiB, MiB etc)
fs_params="${ANSWER_NUMBER}M"
fi
- if [ "$fs_type" = dm_crypt ]
+ if [ "$fs_create" == yes ] && [ "$fs_type" = dm_crypt ]
then
[ -z "$fs_params" ] && default='-c aes-xts-plain -y -s 512'
[ -n "$fs_params" ] && default="${fs_params//_/ }"
@@ -477,18 +504,21 @@ interactive_filesystem ()
fi
# ask opts
- default=
- [ -n "$fs_opts" ] && default="$fs_opts"
- program=`get_filesystem_program $fs_type`
- ask_string "Enter any additional opts for $program" "$default" 0
- fs_opts=$(sed 's/ /_/g' <<< "$ANSWER_STRING") #TODO: clean up all whitespace (tabs and shit)
+ if [ "$fs_create" == yes ]
+ then
+ default=
+ [ -n "$fs_opts" ] && default="$fs_opts"
+ program=`get_filesystem_program $fs_type`
+ ask_string "Enter any additional opts for $program" "$default" 0
+ fs_opts=$(sed 's/ /_/g' <<< "$ANSWER_STRING") #TODO: clean up all whitespace (tabs and shit)
+ fi
[ -z "$fs_type" ] && fs_type=no_type
[ -z "$fs_mountpoint" ] && fs_mountpoint=no_mountpoint
[ -z "$fs_opts" ] && fs_opts=no_opts
[ -z "$fs_label" ] && fs_label=no_label
[ -z "$fs_params" ] && fs_params=no_params
- NEW_FILESYSTEM="$fs_type;yes;$fs_mountpoint;target;$fs_opts;$fs_label;$fs_params" #TODO: make re-creation yes/no asking available in this UI.
+ NEW_FILESYSTEM="$fs_type;$fs_create;$fs_mountpoint;target;$fs_opts;$fs_label;$fs_params"
# add new theoretical blockdevice, if relevant
new_device=
@@ -771,11 +801,13 @@ interactive_runtime_network() {
IPADDR=$ANSWER_STRING
ask_string "Enter your netmask" "255.255.255.0" || return 1
SUBNET=$ANSWER_STRING
- ask_string "Enter your broadcast" "192.168.0.255" || return 1
+ ask_string "Enter your broadcast" "$(sed 's/\.[^.]*$/\.255/' <<< $IPADDR)" || return 1
BROADCAST=$ANSWER_STRING
- ask_string "Enter your gateway (optional)" "192.168.0.1" 0 || return 1
+ ask_string "Enter your gateway (optional)" "$(sed 's/\.[^.]*$/\.1/' <<< $IPADDR)" 0 || return 1
GW=$ANSWER_STRING
- ask_string "Enter your DNS server IP" "192.168.0.1" || return 1
+ [ -n "$GW" ] && default_dns="$GW"
+ [ -z "$GW" ] && default_dns="$(sed 's/\.[^.]*$/\.1/' <<< $IPADDR)"
+ ask_string "Enter your DNS server IP" "$default_dns" || return 1
DNS=$ANSWER_STRING
ask_string "Enter your HTTP proxy server, for example:\nhttp://name:port\nhttp://ip:port\nhttp://username:password@ip:port\n\n Leave the field empty if no proxy is needed to install." "" 0 || return 1
PROXY_HTTP=$ANSWER_STRING
@@ -815,7 +847,7 @@ interactive_runtime_network() {
interactive_install_bootloader () {
ask_option Grub "Choose bootloader" "Which bootloader would you like to use? Grub is the Arch default." required \
"Grub" "Use the GRUB bootloader (default)" \
- "None" "\Zb\Z1Warning\Z0\ZB: you must install your own bootloader!"
+ "None" "\Zb\Z1Warning\Z0\ZB: you must install your own bootloader!" || return 1
bl=`tr '[:upper:]' '[:lower:]' <<< "$ANSWER_OPTION"`
[ "$bl" != grub ] && return 0
@@ -828,12 +860,12 @@ interactive_grub() {
local grubmenu="$var_TARGET_DIR/boot/grub/menu.lst"
[ ! -f $grubmenu ] && show_warning "No grub?" "Error: Couldn't find $grubmenu. Is GRUB installed?" && return 1
- gblog="/tmp/gb.log"
- echo "Start grub" > $gblog
+ debug FS "starting interactive_grub"
# try to auto-configure GRUB...
debug 'UI-INTERACTIVE' "install_grub \$PART_ROOT $PART_ROOT \$GRUB_OK $GRUB_OK"
- if [ -n "$PART_ROOT" -a "$GRUB_OK" != '1' ] ; then
+ if get_device_with_mount '/' && [ "$GRUB_OK" != '1' ] ; then
GRUB_OK=0
+ PART_ROOT=$ANSWER_DEVICE
# look for a separately-mounted /boot partition
# This could be used better, maybe we use a better variable name cause
# we use this later in many things in workflow.
@@ -850,7 +882,7 @@ interactive_grub() {
ask_yesno "Do you have your system installed on software raid?\nAnswer 'YES' to install grub to another hard disk." no
if [ $? -eq 0 ]; then
onraid=true
- echo "onraid is selected" >> $gblog
+ debug FS "onraid is selected"
fi
fi
# Create and edit the grub menu.lst
@@ -966,9 +998,9 @@ interactive_grub() {
}
interactive_grub_menulst() {
-
- local _rootpart="${PART_ROOT}"
- local _uuid="$(getuuid ${PART_ROOT})"
+ get_device_with_mount '/' || return 1
+ local _rootpart=$ANSWER_DEVICE
+ local _uuid="$(getuuid ${_rootpart})"
# attempt to use a UUID if the root device has one
if [ -n "${_uuid}" ]; then
_rootpart="/dev/disk/by-uuid/${_uuid}"
@@ -989,19 +1021,19 @@ interactive_grub_menulst() {
# wrong with menu.lst settings (wrong boot device or wrong root=/device)
# he better should re-run the interactive grub install and select correct
# settings.
- echo "Grub Part_root: "$PART_ROOT >> $gblog
- echo "Grub bootdev: "$bootdev >> $gblog
+ debug FS "Grub _rootpart: ${_rootpart}"
+ debug FS "Grub bootdev: "$bootdev
# No seperate /boot partition
if [ -z $bootdev ]; then
# Special handling on md raid
if [ $onraid ]; then
- grubdev=$(mapdev $(mdraid_slave0 $PART_ROOT))
- echo "onraid no sep boot slave0: "$(mdraid_slave0 $PART_ROOT) >> $gblog
- echo "onraid no sep boot grubdev: "$grubdev >> $gblog
+ grubdev=$(mapdev $(mdraid_slave0 ${_rootpart}))
+ debug FS "onraid no sep boot slave0: "$(mdraid_slave0 ${_rootpart})
+ debug FS "onraid no sep boot grubdev: "$grubdev
else
# No raid
- grubdev=$(mapdev $PART_ROOT)
- echo "no sep boot grubdev: "$grubdev >> $gblog
+ grubdev=$(mapdev ${_rootpart})
+ debug FS "no sep boot grubdev: "$grubdev
fi
# Without seperate /boot partiton we have to specify this path
subdir="/boot"
@@ -1010,12 +1042,12 @@ interactive_grub_menulst() {
# Special handling on md raid
if [ $onraid ]; then
grubdev=$(mapdev $(mdraid_slave0 $bootdev))
- echo "onraid with sep boot slave0: "$(mdraid_slave0 $bootdev) >> $gblog
- echo "onraid with sep boot grubdev: "$grubdev >> $gblog
+ debug FS "onraid with sep boot slave0: "$(mdraid_slave0 $bootdev)
+ debug FS "onraid with sep boot grubdev: "$grubdev
else
# No raid
grubdev=$(mapdev $bootdev)
- echo "onraid with sep boot grubdev: "$grubdev >> $gblog
+ debug FS "onraid with sep boot grubdev: "$grubdev
fi
fi
# Now that we have our grub-legacy root device (grubdev).
@@ -1026,18 +1058,47 @@ interactive_grub_menulst() {
fi
# remove default entries by truncating file at our little tag (#-*)
sed -i -e '/#-\*/q' $grubmenu
+
+ # handle dmraid/mdadm,lvm,dm_crypt etc. replace entries where needed automatically
+ debug 'FS' 'Grub kernel line? Assuming "/ on raw" or "/ on lvm on raw" as default'
+ kernel="kernel $subdir/vmlinuz26 root=${_rootpart} ro"
+ if get_anchestors_mount ';/;'
+ then
+ if echo "$ANSWERS_DEVICES" | sed -n '1p' | grep -q 'dm_crypt$' && echo "$ANSWERS_DEVICES" | sed -n '2p' | grep -q 'raw$'
+ then
+ debug 'FS' 'Grub kernel line? Found / on dm_crypt on raw'
+ raw_device=`echo "$ANSWERS_DEVICES" | sed -n '2p' | cut -d ' ' -f1`
+ kernel="kernel $subdir/vmlinuz26 root=$raw_device ro"
+ elif echo "$ANSWERS_DEVICES" | sed -n '1p' | grep -q 'lvm-lv$' && echo "$ANSWERS_DEVICES" | sed -n '4p' | grep -q 'dm_crypt$' && echo "$ANSWERS_DEVICES" | sed -n '5p' | grep -q 'raw$'
+ then
+ debug 'FS' 'Grub kernel line? Found / on lvm on dm_crypt on raw'
+ lv_device=`echo "$ANSWERS_DEVICES" | sed -n '1p' | cut -d ' ' -f1`
+ vg_device=`echo "$ANSWERS_DEVICES" | sed -n '2p' | cut -d ' ' -f1`
+ crypt_device=`echo "$ANSWERS_DEVICES" | sed -n '4p' | cut -d ' ' -f1`
+ kernel="kernel $subdir/vmlinuz26 root=$lv_device cryptdevice=$crypt_device:`basename $vgdevice` ro"
+ elif echo "$ANSWERS_DEVICES" | sed -n '1p' | grep -q 'dm_crypt$' && echo "$ANSWERS_DEVICES" | sed -n '2p' | grep -q 'lvm-lv$' && echo "$ANSWERS_DEVICES" | sed -n '5p' | grep -q 'raw$'
+ then
+ debug 'FS' 'Grub kernel line? Found / on dm_crypt on lvm on raw'
+ crypt_device=`echo "$ANSWERS_DEVICES" | sed -n '1p' | cut -d ' ' -f1`
+ lv_device=`echo "$ANSWERS_DEVICES" | sed -n '2p' | cut -d ' ' -f1`
+ kernel=" kernel $subdir/vmlinuz26 root=$crypt_device cryptdevice=$lv_device:root ro"
+ else
+ debug 'FS' 'Grub kernel line? Could not figure this one out'
+ show_warning "Disk setup detection" "Could not figure out what kind of disk setup you are using. Are you using some really fancy dm_crypt/lvm/softraid setup? Please file a bug for this and supply all files from /tmp/aif/"
+ fi
+ fi
cat >>$grubmenu <<EOF
# (0) Arch Linux
title Arch Linux
root $grubdev
-kernel $subdir/vmlinuz26 root=${_rootpart} ro
+$kernel
initrd $subdir/kernel26.img
# (1) Arch Linux
title Arch Linux Fallback
root $grubdev
-kernel $subdir/vmlinuz26 root=${_rootpart} ro
+$kernel
initrd $subdir/kernel26-fallback.img
# (2) Windows
@@ -1047,19 +1108,18 @@ initrd $subdir/kernel26-fallback.img
#chainloader +1
EOF
- notify "Before installing GRUB, you must review the configuration file. You will now be put into the editor. After you save your changes and exit the editor, you can install GRUB."
- [ -n "$EDITOR" ] || interactive_get_editor
+ helptext=
+ grep -q '^/dev/mapper' $TMP_FSTAB && helptext=" /dev/mapper/ users: Pay attention to the kernel line!"
+ notify "Before installing GRUB, you must review the configuration file. You will now be put into the editor. After you save your changes and exit the editor, you can install GRUB.$helptext"
+ if [ -z "$EDITOR" ]
+ then
+ interactive_get_editor || return 1
+ fi
$EDITOR $grubmenu
}
interactive_grub_install () {
- #TODO: handle dmraid/mdadm,lvm,dm_crypt etc. replace entries where needed
- # / on dm_crypt -> no substitution needed: specify physical device that hosts the encrypted /
- # / on lvm -> root=/dev/mapper/<volume-group>-<logical-volume-root> resume=/dev/mapper/<volume-group>-<logical-volume-swap>
- # / on lvm on dm_crypt -> root=/dev/mapper/<volume-group>-<logical-volume-root> cryptdevice=/dev/<luks-part>:<volume-group>
- # / on dm_crypt on lvm -> specify the lvm device that hosts the encrypted /
- # ...
-
+ debug FS "interactive_grub_install called. P1 = $1, P2 = $2, P3 = $3"
# $1 = bootpart
# $2 = bootdev
# $3 = boothd
@@ -1082,12 +1142,9 @@ interactive_grub_install () {
return 1
fi
local boothd=$3
- echo "P1: $1" >> $gblog
- echo "P2: $2" >> $gblog
- echo "P3: $3" >> $gblog
- echo "bootpart: $bootpart" >> $gblog
- echo "bootdev: $bootdev" >> $gblog
- echo "boothd: $boothd" >> $gblog
+ debug FS "bootpart: $bootpart"
+ debug FS "bootdev: $bootdev"
+ debug FS "boothd: $boothd"
#return 0
$var_TARGET_DIR/sbin/grub --no-floppy --batch >/tmp/grub.log 2>&1 <<EOF
@@ -1117,12 +1174,12 @@ interactive_select_source()
var_SYNC_URL=
ask_option no "Source selection" "Please select an installation source" required \
- "1" "CD-ROM or OTHER SOURCE" \
- "2" "FTP/HTTP" || return 1
+ "cd" "CD-ROM or OTHER SOURCE" \
+ "net" "NET (FTP/HTTP)" || return 1
case $ANSWER_OPTION in
- "1") var_PKG_SOURCE_TYPE="cd" ;;
- "2") var_PKG_SOURCE_TYPE="ftp" ;;
+ "cd") var_PKG_SOURCE_TYPE="cd" ;;
+ "net") var_PKG_SOURCE_TYPE="net" ;;
esac
if [ "$var_PKG_SOURCE_TYPE" = "cd" ]; then
@@ -1134,7 +1191,7 @@ interactive_select_source()
fi
echo "Using CDROM for package installation" >$LOG
else
- TITLE="Arch Linux FTP/HTTP Installation"
+ TITLE="Arch Linux NET (FTP/HTTP) Installation"
notify "If you wish to load your ethernet modules manually, please do so now in an another terminal."
fi
return 0
@@ -1173,7 +1230,7 @@ interactive_get_editor() {
which nano &>/dev/null && EDITOR_OPTS+=("nano" "nano (easier)")
which joe &>/dev/null && EDITOR_OPTS+=("joe" "joe's editor")
which vi &>/dev/null && EDITOR_OPTS+=("vi" "vi (advanced)")
- ask_option no "Text editor selection" "Select a Text Editor to Use" required "${EDITOR_OPTS[@]}"
+ ask_option nano "Text editor selection" "Select a Text Editor to Use" required "${EDITOR_OPTS[@]}" || return 1
#TODO: this code could be a little bit cleaner.
case $ANSWER_OPTION in
"nano") EDITOR="nano" ;;
@@ -1187,10 +1244,10 @@ interactive_get_editor() {
select_source_extras_menu ()
{
while true; do
- ask_option no "FTP Installation" "Make sure the network is ok and you've selected a mirror before continuing the installer" required \
+ ask_option no "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"
+ "3" "Return to Main Menu" || return 1
[ "$ANSWER_OPTION" = 1 ] && execute worker runtime_network
[ "$ANSWER_OPTION" = 2 ] && execute worker select_mirror
[ "$ANSWER_OPTION" = 3 ] && break