]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
network: Create route to gateway
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Mar 2017 16:15:35 +0000 (17:15 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Mar 2017 16:17:03 +0000 (17:17 +0100)
Some hosters have their gateway in a different subnet than
the RED interface is to save IPv4 address space.

This patch sets a host route to that gateway so that
IPFire can be installed in data centres that use such
technique.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/networking/red

index 9dfbad65ed8c62de510f71c0c6ca5d43e6e76046..00e739cab14aedff772b88fc6fe9bc003897e29a 100644 (file)
@@ -124,6 +124,9 @@ case "${1}" in
                        echo -n "${DNS2}" > /var/ipfire/red/dns2
                        touch /var/ipfire/red/active
                        
+                       # Create route to default gateway
+                       ip route add ${GATEWAY} dev ${DEVICE}
+
                        boot_mesg "Setting up default gateway ${GATEWAY}..."
                        ip route add default via ${GATEWAY} dev ${DEVICE}
                        evaluate_retval