network: Create route to gateway

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>
This commit is contained in:
Michael Tremer
2017-03-28 17:15:35 +01:00
parent 2170bad5b9
commit 0be884d6b2

View 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