summaryrefslogtreecommitdiffstats
path: root/setup-lbu.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-26 12:46:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-26 13:27:17 +0000
commit188e04ef1340fabd8efbff5edfbbbb301b5a6740 (patch)
treef7251e74f491a1817df87e700673889ed20a713d /setup-lbu.in
parenta424dd73af5db1b09e912759ec8fd09b5c194a5f (diff)
downloadalpine-conf-188e04ef1340fabd8efbff5edfbbbb301b5a6740.tar.bz2
alpine-conf-188e04ef1340fabd8efbff5edfbbbb301b5a6740.tar.xz
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-xsetup-lbu.in7
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