Generally all hosts that have got "gateway" in their name
have been removed from that file.
E.g. vpngateway.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
#Check if gateway has answerd to ping, if not replace with ping.ipfire.org
TEST=`/usr/bin/ping -c 2 $5 2>/dev/null | tail -2 | head -1 | cut -d"," -f2`;
#Check if gateway has answerd to ping, if not replace with ping.ipfire.org
TEST=`/usr/bin/ping -c 2 $5 2>/dev/null | tail -2 | head -1 | cut -d"," -f2`;
-grep -v "gateway" /etc/hosts > /tmp/hosts
+grep -v -E "\<gateway\>" /etc/hosts > /tmp/hosts
if [ "$TEST" == " 2 received" ]; then
#ping the ppp-gateway
if [ "$TEST" == " 2 received" ]; then
#ping the ppp-gateway