Commit b7a0cb13 authored by Vitaly Lipatov's avatar Vitaly Lipatov

list: add support for all and ALL

parent 56e767d6
......@@ -31,6 +31,16 @@ info()
echo "$*"
}
list_all()
{
vzlist -1
}
list_ALL()
{
vzlist -1 -a
}
CMD=$1
shift
case $CMD in
......@@ -68,8 +78,13 @@ case $CMD in
exec)
INCMD="$1"
shift
for i in "$@" ; do
LIST="$*"
[ "$1" = "all" ] && LIST="$(list_all)"
[ "$1" = "ALL" ] && LIST="$(list_ALL)"
for i in $LIST ; do
#info "Executing on $i ..."
#printf "%3d: %s" $i "$(vzctl exec $i "$INCMD")"
#vzctl exec $i "$INCMD" | sed -e "s|^|$(printf "%3d: " $i)|g"
vzctl exec $i "$INCMD"
done
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment