diff options
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 |