summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2010-03-26 10:28:34 +0100
committerDan Horák <dan@danny.cz>2010-03-26 10:28:34 +0100
commit5773577f235cd2cd3b55bd82f8fb9c4002f1b978 (patch)
tree37cd8bb996adc7721a3e1d04a8fa8b6734ddec2b
parent16fd0c1cc2bf0d5f75f9d286fde834cf25593acc (diff)
downloadutils-5773577f235cd2cd3b55bd82f8fb9c4002f1b978.tar.gz
utils-5773577f235cd2cd3b55bd82f8fb9c4002f1b978.tar.xz
utils-5773577f235cd2cd3b55bd82f8fb9c4002f1b978.zip
introduce "all" mode
A new "all" mode is introduced when we are called with the "device_cio_free" and it means automatic run of all the dasd|zfcp|znet subfunctions.
-rw-r--r--device_cio_free15
1 files changed, 10 insertions, 5 deletions
diff --git a/device_cio_free b/device_cio_free
index 8378999..a7bac3d 100644
--- a/device_cio_free
+++ b/device_cio_free
@@ -82,6 +82,7 @@ wait_on_device()
# check how we were called
CMD=${0##*/}
DIR=${0%/*}
+ARGS=$@
case $CMD in
"dasd_cio_free")
CONFIG=$DASDCONFIG
@@ -96,11 +97,7 @@ case $CMD in
MODE=znet
;;
"device_cio_free")
- # shortcut for calling all 3 scripts
- $DIR/dasd_cio_free $@ || exit $?
- $DIR/zfcp_cio_free $@ || exit $?
- $DIR/znet_cio_free $@ || exit $?
- exit 0
+ MODE=all
;;
*)
echo "Error: unknown alias '$CMD'."
@@ -131,6 +128,14 @@ if [ ! -f $BLACKLIST ]; then
exit 2
fi
+if [ $MODE = "all" ]; then
+ # shortcut for calling all 3 scripts
+ $DIR/dasd_cio_free $ARGS || exit $?
+ $DIR/zfcp_cio_free $ARGS || exit $?
+ $DIR/znet_cio_free $ARGS || exit $?
+ exit 0
+fi
+
[ $VERBOSE ] && echo "Freeing $MODE devices"
if [ $MODE = "dasd" -o $MODE = "zfcp" ]; then