diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-07 14:21:42 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-07 14:21:42 +0000 |
commit | ee7608c28406bbbae45d87827c1b5f5523f08495 (patch) | |
tree | 303a70d06418db21e8be61f6fee99b1854c1710e | |
parent | 67e7598299847094d70078f5738d4f55f81473d7 (diff) | |
download | alpine-conf-ee7608c28406bbbae45d87827c1b5f5523f08495.zip |
setup-disk: explain that no disks was found unless -q (quiet)
-rw-r--r-- | setup-disk.in | 10 |
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 |