summaryrefslogtreecommitdiffstats
path: root/rc.inet1
diff options
context:
space:
mode:
Diffstat (limited to 'rc.inet1')
-rw-r--r--rc.inet19
1 files changed, 5 insertions, 4 deletions
diff --git a/rc.inet1 b/rc.inet1
index 10f97d8..367aaca 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -350,10 +350,11 @@ if_down() {
# Function to bring up the gateway if there is not yet a default route:
gateway_up() {
- if ! /sbin/ip route show | grep -wq default ; then
- if [ -n "$GATEWAY" ]; then
- echo "/etc/rc.d/rc.inet1: /sbin/ip route add default via ${GATEWAY}" | $LOGGER
- /sbin/ip route add default via ${GATEWAY} | $LOGGER
+ # Bring up the IPv4 gateway:
+ if [ -n "$GATEWAY" ]; then
+ if ! /sbin/ip -4 route show | grep -wq default ; then
+ echo "/etc/rc.d/rc.inet1: /sbin/ip -4 route add default via ${GATEWAY}" | $LOGGER
+ /sbin/ip -4 route add default via ${GATEWAY}
fi
fi
}