summaryrefslogtreecommitdiffstats
path: root/setup-disk.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-04-07 14:21:42 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-04-07 14:21:42 +0000
commitee7608c28406bbbae45d87827c1b5f5523f08495 (patch)
tree303a70d06418db21e8be61f6fee99b1854c1710e /setup-disk.in
parent67e7598299847094d70078f5738d4f55f81473d7 (diff)
downloadalpine-conf-ee7608c28406bbbae45d87827c1b5f5523f08495.tar.bz2
alpine-conf-ee7608c28406bbbae45d87827c1b5f5523f08495.tar.xz
setup-disk: explain that no disks was found unless -q (quiet)
Diffstat (limited to 'setup-disk.in')
-rw-r--r--setup-disk.in10
1 files changed, 7 insertions, 3 deletions
diff --git a/setup-disk.in b/setup-disk.in
index 08c5e89..fd7c0e2 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -698,11 +698,12 @@ esac
SWAP_SIZE=$(find_swap_size)
# Parse args
-while getopts "hk:o:rs:v" opt; do
+while getopts "hk:o:qrs:v" opt; do
case $opt in
k) KERNEL_FLAVOR="$OPTARG";;
- r) USE_RAID=1;;
o) APKOVL="$OPTARG";;
+ q) QUIET=1;;
+ r) USE_RAID=1;;
s) SWAP_SIZE="$OPTARG";;
v) VERBOSE=1;;
*) usage;;
@@ -730,7 +731,10 @@ disks=$(find_disks)
disk=none
# no disks so lets exit quietly.
-[ -z "$disks" ] && exit 0
+if [ -z "$disks" ]; then
+ [ -z "$QUIET" ] && echo "No disks found." >&2
+ exit 0
+fi
if [ $# -gt 0 ]; then
# check that they are