Commit 15ebf9b5 authored by Vitaly Lipatov's avatar Vitaly Lipatov

evz: add list, exec

parent 45674b3d
......@@ -7,6 +7,7 @@ _evz_list()
{
#COMPREPLY=( $( evz list-all 2>/dev/null ) )
#COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
true
}
_evz_usage_list()
......@@ -14,7 +15,7 @@ _evz_usage_list()
#local USLIST=$(evz ${prev##*/} usage 2>/dev/null | sed -e "y/|/ /" -ne "s/^.*\(u\|U\|msg_u\)sage.*{\(.*\)}.*$/\2/p")
#COMPREPLY=( $( compgen -W '$USLIST' -- "$cur" ) )
# TODO: from evz --help
COMPREPLY=( $( echo "on off stop start destroy" ) )
COMPREPLY=( $( echo "on off stop start destroy list exec" ) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
}
......
......@@ -62,6 +62,17 @@ case $CMD in
vzctl start $i
done
;;
list)
vzlist "$@"
;;
exec)
INCMD="$1"
shift
for i in "$@" ; do
#info "Executing on $i ..."
vzctl exec $i "$INCMD"
done
;;
destroy)
echo "You request to destroy follow containers:"
vzlist "$@"
......
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