Hello,
This is the script i'm using :
/etc/network/if-up.d/net_is_configured :
#!/bin/sh # Testing if network is up before continuing network=`route -n | sed -ne '/^224/d' -e '/^127/d' -e '/^[0-9]/p'`; timeout=0 while [ "${network}" = "" ] && [ ${timeout} -le 20 ] do network=`route -n | sed -ne '/^224/d' -e '/^127/d' -e '/^[0-9]/p'`; echo -n "."; timeout=$((${timeout} + 1)); sleep 1; done if [ ${timeout} -ge 20 ];then echo " Pas de connexion réseau"; else echo " Done"; fi
Hope this will help you
Hello,
This is the script i'm using :
/etc/network/ if-up.d/ net_is_ configured :
#!/bin/sh
timeout= $((${timeout} + 1));
# Testing if network is up before continuing
network=`route -n | sed -ne '/^224/d' -e '/^127/d' -e '/^[0-9]/p'`;
timeout=0
while [ "${network}" = "" ] && [ ${timeout} -le 20 ]
do network=`route -n | sed -ne '/^224/d' -e '/^127/d' -e '/^[0-9]/p'`;
echo -n ".";
sleep 1;
done
if [ ${timeout} -ge 20 ];then
echo " Pas de connexion réseau";
else
echo " Done";
fi
Hope this will help you