diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-10-26 12:46:34 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-10-26 13:27:17 +0000 |
commit | 188e04ef1340fabd8efbff5edfbbbb301b5a6740 (patch) | |
tree | f7251e74f491a1817df87e700673889ed20a713d /setup-lbu.in | |
parent | a424dd73af5db1b09e912759ec8fd09b5c194a5f (diff) | |
download | alpine-conf-188e04ef1340fabd8efbff5edfbbbb301b5a6740.zip |
setup-lbu: fix prompt
- encapsulate the alternatives in ''
- strip whitespacee from alternatives and separate with ,
- fix prompt
Diffstat (limited to 'setup-lbu.in')
-rwxr-xr-x | setup-lbu.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/setup-lbu.in b/setup-lbu.in index 51a165b..1a27657 100755 --- a/setup-lbu.in +++ b/setup-lbu.in @@ -103,13 +103,16 @@ suggestion="none" for dir in /media/*; do [ -d "$dir" ] || continue [ "$dir" = "/media/cdrom" ] && continue - alternatives="$alternatives ${dir#/media/}" + alternatives="$alternatives, '${dir#/media/}'" if is_mounted $dir; then suggestion=${dir#/media/} [ -n "$quiet" ] && media=$suggestion fi done +# strip leading , + space +alternatives=${alternatives#, } + # if nothing is mounted (or boot from cdrom) usbmnt=$(awk '$1 == "/dev/usbdisk" {print $2}' /proc/mounts) if [ -z "$suggestion" ] && [ -n "$usbmnt" ]; then @@ -120,7 +123,7 @@ if [ -z "$suggestion" ] && [ -n "$usbmnt" ]; then fi while [ -z "$media" ]; do - echo "Where would you like to store configs? ($alternatives or none) [$suggestion] " + echo -n "Enter where to store configs ($alternatives or 'none') [$suggestion]: " default_read media $suggestion if [ "$media" = "none" ] || [ -d "/media/$media" ]; then break |