mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
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 <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
b89903559e
commit
3e4c5afaee
@@ -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
|
#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`;
|
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
|
if [ "$TEST" == " 2 received" ]; then
|
||||||
#ping the ppp-gateway
|
#ping the ppp-gateway
|
||||||
|
|||||||
Reference in New Issue
Block a user