Index: drbl-virt/sbin/drbl_client_cmd
===================================================================
--- drbl-virt/sbin/drbl_xen_cmd.sh	(revision 203)
+++ drbl-virt/sbin/drbl_client_cmd	(revision 211)
@@ -24,9 +24,8 @@
 echo "Usage: drbl_xen_cmd.sh options"
 echo "Options:"
-echo "-h|--host           which host"
-echo "-v|--vm             vm name"
-echo "-x|--xen_command    xen command"
+echo "-c|--client         client name"
+echo "-x|--execute        execute command"
 echo "Example:"
-echo "drbl_xen_cmd.sh -h drbl101 -v drbl131 -x 'shutdown'"
+echo "drbl_xen_cmd.sh -c drbl101 -x 'shutdown'"
 }
 
@@ -41,5 +40,5 @@
 while [ $# -gt 0 ]; do
     case "$1" in
-        -h|--host)
+        -c|--client)
             shift 
             if [ -z "$(echo $1 |grep ^-.)" ]; then
@@ -53,23 +52,11 @@
             fi 
             ;; 
-        -v|--vm)
-            shift
-            if [ -z "$(echo $1 |grep ^-.)" ]; then
-                if [ -n "$(echo $1)" ]; then
-                    vm_name=$1
-                else
-                    echo "-v vm_name is null"
-                    Usage && exit 2
-                fi
-            shift
-            fi
-            ;;
-        -x|--xen_command)
+        -x|--command)
             shift 
             if [ -z "$(echo $1 |grep ^-.)" ]; then
                 if [ -n "$(echo $1)" ]; then
-                xen_command="$1"
+                command="$1"
                 else
-                    echo "-x xen command is null"
+                    echo "-x command is null"
                     Usage && exit 2
                 fi  
@@ -92,29 +79,9 @@
 # = 2. Check null value =
 [ -z $client_name ] && echo "[Error] no host" && Usage && exit 2
-[ -z $vm_name ] && echo "[Error] no VM value" && Usage && exit 2
-[ -z "$xen_command" ] && echo "[Error] no xen command" && Usage && exit 2
+[ -z "$command" ] && echo "[Error] no command" && Usage && exit 2
 
 
-# = 3. Check exist
-# VM name
-IP_VM_files=$(ls $Work_Home/etc/IP_VM_eth[0-9]*)
-
-for IP_VM_file in $IP_VM_files
-do                                                                                                                                 
-    IP_VM_ip=$(cat $IP_VM_file | grep "$vm_name" | awk '{print $1}') 
-    if [ -n $IP_VM_name ]; then
-        IP_VM_right_file=$IP_VM_file
-        IP_VM_right_ip=$IP_VM_ip
-    fi
-done
-
-if [ -z $IP_VM_right_ip ]; then
-    echo ""
-    echo "[Error] this vm name is wrong!"
-    echo "Please check $Wokr_Home/etc/"
-    exit 2
-fi
-
-cat $Work_Home/etc/IP_HOST_TABLE | grep $client_name
+# = 3. Check client exist
+grep $client_name $Work_Home/etc/IP_HOST_TABLE >> /dev/null
 if [ $? -ne 0 ]; then
     echo "[Error] This host is not DRBL client"
@@ -122,4 +89,5 @@
 fi
 
+echo "[$client_name]"
 
 # = 4. ssh host to deploy VM  =
@@ -128,4 +96,4 @@
 
 # start ssh
-ssh -o StrictHostKeyChecking=no $host_IP "$xen_command"
+ssh -o StrictHostKeyChecking=no $host_IP "$command"
 
