From: Marcus Scholz Date: Wed, 19 Aug 2009 10:36:18 +0000 (+0200) Subject: Fix gateway code that manipulates /etc/hosts. X-Git-Tag: v2.5-core30~20^2~1 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=3e4c5afaee8eb6fe2d62306d4bedcd643a9f5bf1 Fix gateway code that manipulates /etc/hosts. Generally all hosts that have got "gateway" in their name have been removed from that file. E.g. vpngateway. Signed-off-by: Michael Tremer --- diff --git a/src/ppp/ip-up b/src/ppp/ip-up index ab01ad38b7..4ce95a5050 100644 --- a/src/ppp/ip-up +++ b/src/ppp/ip-up @@ -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 "\" /etc/hosts > /tmp/hosts if [ "$TEST" == " 2 received" ]; then #ping the ppp-gateway