diff options
Diffstat (limited to 'device_cio_free')
-rw-r--r-- | device_cio_free | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/device_cio_free b/device_cio_free index 4a986c9..71eb400 100644 --- a/device_cio_free +++ b/device_cio_free @@ -28,6 +28,7 @@ ZNETCONFIG=/etc/ccw.conf BLACKLIST=/proc/cio_ignore VERBOSE= PATH=/bin:/sbin +DEVICE= # list of devices given on command line ALL_DEVICES= # list of all unblocked devices WAITING_TIMEOUT=60 # maximum time to wait for all devices to appear WAITING_TOTAL=0 # actual time spent waiting for devices @@ -212,7 +213,16 @@ while [ $# -gt 0 ]; do ;; -d|--device) shift - [ -n "$1" ] && DEVICE="$DEVICE,$1" || usage + if [ -n "$1" ]; then + if [ "$DEVICE" ]; then + DEVICE="$DEVICE,$1" + else + DEVICE=$1 + fi + else + echo "Error: no device given" + usage + fi ;; *) echo "Error: unknown option $1" |