summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/install_proxy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config/install_proxy.sh')
-rwxr-xr-xabs/core/LinHES-config/install_proxy.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/abs/core/LinHES-config/install_proxy.sh b/abs/core/LinHES-config/install_proxy.sh
index 71b675b..4bb2444 100755
--- a/abs/core/LinHES-config/install_proxy.sh
+++ b/abs/core/LinHES-config/install_proxy.sh
@@ -88,19 +88,31 @@ case $1 in
;;
check_gw)
#check gateway
+ rc=0
echo "network check gateway"
/sbin/route -n
mygwdefault=`/sbin/route -n |grep $default_interface|grep UG|awk '{ print $2}'`
echo "Default gateway seems to be $mygwdefault"
if [ ! x$mygwdefault = x ]
then
- sleep 2
- ping -c 5 $mygwdefault
- if [ ! $? = 0 ]
+ #sleep 2
+ for i in `seq 10`
+ do
+ ping -c 1 $mygwdefault
+ if [ $? = 0 ]
+ then
+ break
+ rc=1
+ fi
+ done
+
+
+ if [ rc = 0 ]
then
exit 4
fi
fi
+
;;
check_ns)
#check nameserver