From f6d1d6e23c7bf5dfd8e00b9bfd32fadc88f76caf Mon Sep 17 00:00:00 2001 From: Dan HorĂ¡k Date: Wed, 7 Apr 2010 15:16:46 +0200 Subject: allow devices to be specified on command line Added -d|--device command line option for passing devices that needs to be unblocked. --- device_cio_free | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/device_cio_free b/device_cio_free index 1c895b3..59e4e33 100644 --- a/device_cio_free +++ b/device_cio_free @@ -21,13 +21,16 @@ ZNETCONFIG=/etc/ccw.conf BLACKLIST=/proc/cio_ignore VERBOSE= PATH=/bin:/usr/bin:/sbin:/usr/sbin -ALL_DEVICES= +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 usage() { - echo "Usage: $CMD [-h|--help] [-V|--verbose]" + echo "Usage: $CMD [-h|--help] [-V|--verbose] [-d|--device ]" + echo " -h|--help print this message" + echo " -V|--verbose be verbose" + echo " -d|--device unblock and wait for specified device" exit 1 } @@ -135,6 +138,10 @@ while [ $# -gt 0 ]; do -h|--help) usage ;; + -d|--device) + shift + [ -n "$1" ] && DEVICE="$DEVICE $1" || usage + ;; *) echo "Error: unknown option $1" usage -- cgit