Skip to content
Snippets Groups Projects
Verified Commit eff5ff4e authored by David Beniamine's avatar David Beniamine
Browse files

Small improvements

parent 1d5b1ee7
Branches
No related tags found
No related merge requests found
......@@ -22,13 +22,16 @@ getip(){
}
runcmd(){
ssh root@$1 $2
host=$1
shift
echo "Runnig $@ on $host"
ssh root@$host $@
}
conf_dir="/etc/registry"
conf_file="$conf_dir/hosts"
broadcast=$(ip a | awk '/inet.*eth1/ {print $4}' | cut -d / -f 1)
wait_time=300
wait_time=10
wait_step=5
if [ -z "$1" ]
......@@ -47,15 +50,16 @@ done < $conf_file
# Wait for boot
echo ""
while [ $wait_time > 0 ]
while [ $wait_time -gt 0 ]
do
echo -ne "Waiting for boot, remaining $wait_time seconds\r"
sleep $wait_step
wait_time=$(($wait_time - $wait_step))
done
echo -e "\nWaiting finished"
for mac in $MACS
do
ip=$(getip $mac)
run_cmd $ip $cmd &
runcmd $ip $cmd &
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment