]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/ppp/ip-up
Fixed a bug gateway never was changed when ppp was used
[people/pmueller/ipfire-2.x.git] / src / ppp / ip-up
index 1f24658dd68901f0c42cb6f2c30b01012c9a4498..0f32820c08c390140423e95ec49672d2ea877a75 100644 (file)
@@ -43,6 +43,9 @@ fi
 echo -n "$1" > /var/ipfire/red/iface
 echo -n "$4" > /var/ipfire/red/local-ipaddress
 echo -n "$5" > /var/ipfire/red/remote-ipaddress
+grep -v "gateway" /etc/hosts > /tmp/hosts
+echo "$5 gateway"  >> /tmp/hosts
+mv /tmp/hosts /etc/hosts
 
 touch /var/ipfire/red/active