]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
add hosts gateway entry for red static
authorarne_f <arne_f@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 3 Feb 2008 12:58:21 +0000 (12:58 +0000)
committerarne_f <arne_f@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 3 Feb 2008 12:58:21 +0000 (12:58 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1182 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

src/initscripts/init.d/networking/red

index f56cb21843cff2e152c364afae6559db7843f684..52e5d095b03e7b7f380f15c06f7f83cc4b5d2085 100644 (file)
@@ -99,6 +99,9 @@ case "${1}" in
                        echo -n "${DEVICE}" > /var/ipfire/red/iface
                        echo -n "${ADDRESS}"  > /var/ipfire/red/local-ipaddress
                        echo -n "${GATEWAY}" > /var/ipfire/red/remote-ipaddress
+                       grep -v "gateway" /etc/hosts > /tmp/hosts
+                       echo "$GATEWAY gateway"  >> /tmp/hosts
+                       mv /tmp/hosts /etc/hosts
                        echo -n "${DNS1}" > /var/ipfire/red/dns1
                        echo -n "${DNS2}" > /var/ipfire/red/dns2
                        touch /var/ipfire/red/active