From 5c03ae0f698800e4cae751df078443e5fc461787 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sun, 2 Jan 2011 19:03:47 +0100 Subject: simplify default entry setting in interactive_configure_system menu --- src/core/libs/lib-ui-interactive.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 19a0cbb..cb906c6 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -47,17 +47,14 @@ postconfigure_target () { interactive_configure_system() { seteditor || return 1 - FILE="" if ! preconfigure_target then ask_yesno "Do you want to continue?" no || return 1 fi - # main menu loop + local default=no while true; do - DEFAULT=no - [ -n "$FILE" ] && DEFAULT="$FILE" 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/ yourself" grep -q '^/dev/mapper' $TMP_FSTAB && helptext="$helptext\n/dev/mapper/ users: Pay attention to HOOKS in mkinitcpio.conf" grep -q dm_crypt $TMP_BLOCKDEVICES && crypt="/etc/crypttab Encryption_settings_for_non-root_encrypted_disks" # this simple grep will give some false positives. but oh well. @@ -76,7 +73,7 @@ interactive_configure_system() "Root-Password" "Set the root password" \ "Done" "Return to Main Menu" || return 1 FILE=$ANSWER_OPTION - + default=$FILE if [ "$FILE" = "Done" ]; then # exit break elif [ "$FILE" = "Root-Password" ]; then # non-file -- cgit v1.2.3