Avoid to block if ecole-dc is unreachable

parent def2eae7
#!/bin/bash
max=3
retries=0
# Ensure ecole-dc is reachable before mounts
while ! ping -c 1 ecole-dc > /dev/null 2>&1
do
echo "Cannot reach ecole-dc, waiting 10 sec"
sleep 10
if [ $retries -ge $max ]
then
exit
fi
retries=$(($retries+1))
echo "Cannot reach ecole-dc, waiting 5 sec"
sleep 5
done
#[ `grep -c '^//ecole-dc/' /etc/mtab` -gt 0 ] && exit 0
......
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