diff options
| author | Darren 'Tadgy' Austin <darren@afterdark.org.uk> | 2018-08-06 22:18:24 +0100 | 
|---|---|---|
| committer | Robby Workman <rworkman@slackware.com> | 2018-11-25 19:49:52 -0600 | 
| commit | 01c5ea1f994b9003cc17aca2db2ec3c9755a9e3c (patch) | |
| tree | f3fdb4f1f2226e43624828ac843f872f58fa7df2 | |
| parent | 287fda1e7803e757047e49d4deef423bb05faa41 (diff) | |
| download | slacknetsetup-01c5ea1f994b9003cc17aca2db2ec3c9755a9e3c.tar.xz | |
Use -4 when querying/setting routes
Signed-off-by: Robby Workman <rworkman@slackware.com>
| -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  } | 
