summaryrefslogtreecommitdiff
path: root/files/common/sbin/test_gateway
diff options
context:
space:
mode:
authorKatze Miau <miaukatzemiau@priveasy.de>2011-10-16 07:34:24 (GMT)
committerKatze Miau <miaukatzemiau@priveasy.de>2011-10-16 07:34:24 (GMT)
commit9ae01954ef11947693894cf188d75603ab161aac (patch)
tree84a28cd644955e52bd6b91f2c474e9f338841119 /files/common/sbin/test_gateway
parent425e20c0b13cb117e4d2fff04f523478a0618e24 (diff)
add makefile to generate images
Diffstat (limited to 'files/common/sbin/test_gateway')
-rwxr-xr-xfiles/common/sbin/test_gateway15
1 files changed, 15 insertions, 0 deletions
diff --git a/files/common/sbin/test_gateway b/files/common/sbin/test_gateway
new file mode 100755
index 0000000..97296e2
--- /dev/null
+++ b/files/common/sbin/test_gateway
@@ -0,0 +1,15 @@
+#!/bin/sh
+TESTHOST=4.2.2.4
+ping -c 1 -w 5 $TESTHOST &>/dev/null
+
+if [ $? -ne 0 ] ; then
+ // IP not reachable -> try if-down-up
+ ifdown wan
+ ifup wan
+ sleep 10
+ // Test Again
+ ping -c 1 -w 5 4.2.2.4 &>/dev/null
+ if [ $? -ne 0 ] ; then
+ ifdown wan
+ fi
+fi
contact: Jan Huwald // Impressum