diff options
-rw-r--r-- | rc.inet1 | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 } |