]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Fix gateway code that manipulates /etc/hosts.
authorMarcus Scholz <marcus.scholz@ipfire.org>
Wed, 19 Aug 2009 10:36:18 +0000 (12:36 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 19 Aug 2009 10:36:18 +0000 (12:36 +0200)
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>
src/ppp/ip-up

index ab01ad38b71f8eea2216d8e64906cfed615f91db..4ce95a5050d9205a280ece88c43eb03b9720fa3c 100644 (file)
@@ -58,7 +58,7 @@ run_subdir ${rc_base}/init.d/networking/red.up/
 #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