#!/bin/bash

[[ "$1" == "" ]] && ip="10.72.142.207" || ip="$1"
for ((i = 0; i < 60; i++)); do
  if ping $ip -c 1 -W 1 > /dev/null; then break; fi;
  sleep 1;echo -n "."
done
echo
ssh $ip /home/disk.sh
#expect -c "set timeout 60;spawn ssh $ip;expect \"$\" { send /home/disk.sh\rexit\r };expect eof;"
