summaryrefslogtreecommitdiff
path: root/src/core/libs
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-31 15:29:59 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-31 15:29:59 +0100
commit3bcc4ec8d835893505294fe5b5335f3cbd2ea1b8 (patch)
tree4222484c75513a763ca864de1029b8c506012e32 /src/core/libs
parent1e741b98c77d73a1dfd28d6fae8677b31f68d8f4 (diff)
fix/improve default/next entry setting in menu's
* bugfix for commit e5e4eec43cc04cd99648c8b6826af4b9e5c58b10 * simplyfying default setting in 3 places as well
Diffstat (limited to 'src/core/libs')
-rw-r--r--src/core/libs/lib-ui-interactive.sh13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 2aea25b..1e95672 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -180,9 +180,9 @@ interactive_time () {
# correct timezone.
[ "$HARDWARECLOCK" == "localtime" ] && dohwclock $HARDWARECLOCK hctosys
+ local default=no
while true; do
current=$(date)
- local default=no
#TODO: only propose if network ok
EXTRA=()
type ntpdate &>/dev/null && EXTRA=('ntp' 'Set time and date using ntp')
@@ -221,11 +221,11 @@ interactive_prepare_disks ()
local ret=1 # 1 means unsuccessful. 0 for ok
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"
+ local default=no
while [ "$DONE" = "0" ]
do
rollbackstr=" (you don't need to do this)"
[ "$BLOCK_ROLLBACK_USELESS" = "0" ] && rollbackstr=" (this will revert your last changes)"
- local default=no
ask_option $default "Prepare Hard Drive" '' required \
"1" "Auto-Prepare (erases an ENTIRE hard drive and sets up partitions, filesystems and mountpoints)" \
@@ -474,14 +474,12 @@ interactive_filesystem ()
# ask label, if relevant
if [ "$fs_create" == yes ] && check_is_in "$fs_type" "${fs_label_mandatory[@]}"
then
- default=
- [ -n "$fs_label" ] && default="$fs_label"
+ default="$fs_label" # can be empty
ask_string "Enter the label/name for this $fs_type on $part (Mandatory for this type of FS!)" "$default" || return 1 #TODO: check that you can't give LV's labels that have been given already or the installer will break.
fs_label=$ANSWER_STRING
elif [ "$fs_create" == yes ] && check_is_in "$fs_type" "${fs_label_optional[@]}"
then
- default=
- [ -n "$fs_label" ] && default="$fs_label"
+ default="$fs_label" # can be empty
ask_string "Enter the label for this $fs_type on $part (optional) [keep it short and don't use spaces]" "$default" 0
fs_label=${ANSWER_STRING// } # strip spaces to prevent problems in our bash code and to keep things simple.
fi
@@ -535,8 +533,7 @@ interactive_filesystem ()
# ask opts
if [ "$fs_create" == yes ]
then
- default=
- [ -n "$fs_opts" ] && default="$fs_opts"
+ default="$fs_opts" # can be empty
program="${filesystem_programs[$fs_type]}"
ask_string "Enter any additional opts for $program" "$default" 0
fs_opts="$ANSWER_STRING"