diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-28 21:03:29 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-28 21:03:29 +0200 |
commit | 80723298eaeebb522834ad1c027a4d3ffa37ae17 (patch) | |
tree | 898f3bcfec8091e65b874b1f0bb24e9f644a4339 /src/core/libs | |
parent | 29b3157a551bbb99a6113d6b8bb6bf268bb47f67 (diff) |
fix for default value in custom mountpoint + fix for exit condition
Diffstat (limited to 'src/core/libs')
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 6 | ||||
-rw-r--r-- | src/core/libs/lib-ui.sh | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 467be62..e66403a 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -417,7 +417,11 @@ interactive_filesystem () [ -n "$fs_mountpoint" ] && default="$fs_mountpoint" ask_option $default "Select the mountpoint" "Select a mountpoint for $part" required / 'root' /boot 'files for booting' /etc 'config files' /home 'home directories' /tmp 'temporary files' custom 'enter a custom mountpoint' || return 1 fs_mountpoint=$ANSWER_OPTION - [ "$ANSWER_OPTION" == custom ] && ask_string "Enter the custom mountpoint for $part" "$default" && fs_mountpoint=$ANSWER_STRING || return 1 + [ "$default" == 'no' ] && default= + if [ "$ANSWER_OPTION" == custom ] + then + ask_string "Enter the custom mountpoint for $part" "$default" && fs_mountpoint=$ANSWER_STRING || return 1 + fi fi # ask label, if relevant diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index 5d5e4de..82d11f3 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -3,7 +3,7 @@ # TODO: implement 'retry until user does it correctly' everywhere # TODO: at some places we should check if $1 etc is only 1 word because we often depend on that -# TODO: standardize. eg everything $1= question/title, $2=default +# TODO: standardize. eg everything $1= question/title, $2=default. also default should probably be 'no' for no default everywhere # TODO: figure out something to make dia windows always big enough, yet fit nicely in the terminal |