- Timestamp:
 - Oct 15, 2010, 11:19:33 AM (15 years ago)
 - File:
 - 
          
- 1 edited
 
- 
          drbl-virt/sbin/drbl_client_cmd (modified) (1 diff)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
        
drbl-virt/sbin/drbl_client_cmd
r211 r212 82 82 83 83 84 # = 3. Check client exist 85 grep $client_name $Work_Home/etc/IP_HOST_TABLE >> /dev/null 86 if [ $? -ne 0 ]; then 87 echo "[Error] This host is not DRBL client" 88 exit 2 89 fi 90 84 # = 3. ssh client to execute command = 91 85 echo "[$client_name]" 92 86 93 # = 4. ssh host to deploy VM =94 # local varibales 95 host_IP=$(cat $Work_Home/etc/IP_HOST_TABLE | grep $client_name | awk '{print $1}') 87 # check network 88 IP_status="online" 89 ping -c1 -w1 $client_name > /dev/null 2>&1 || IP_status="offline" 96 90 97 # start ssh 98 ssh -o StrictHostKeyChecking=no $host_IP "$command" 99 91 if [ $IP_status == "offline" ]; then 92 echo "[Error] $client_name's network is offline !!!" 93 else 94 ssh -o StrictHostKeyChecking=no $client_name "$command" 95 fi  
Note: See TracChangeset
          for help on using the changeset viewer.
      