default route commands on Linux now require gw or via (iproute2).
This commit is contained in:
parent
cbafcd078d
commit
2c0a71172d
@ -13,7 +13,7 @@ SOS?= BSD
|
|||||||
|
|
||||||
network: network.in network.${OS}
|
network: network.in network.${OS}
|
||||||
cp $@.in $@
|
cp $@.in $@
|
||||||
[ -e $@.${OS} ] && cat $@.${OS} >> $@ || true
|
[ -e $@.${SOS} ] && cat $@.${SOS} >> $@ || true
|
||||||
|
|
||||||
staticroute: staticroute.${SOS}
|
staticroute: staticroute.${SOS}
|
||||||
cp $@.${SOS} $@
|
cp $@.${SOS} $@
|
||||||
|
@ -1,3 +1 @@
|
|||||||
CONF+= ipfw moused powerd rarpd savecore syscons
|
CONF+= ipfw moused powerd rarpd savecore syscons
|
||||||
|
|
||||||
network.${OS}:
|
|
||||||
|
@ -1,3 +1 @@
|
|||||||
CONF+= moused rarpd savecore
|
CONF+= moused rarpd savecore
|
||||||
|
|
||||||
network.${OS}:
|
|
||||||
|
4
conf.d/network.BSD
Normal file
4
conf.d/network.BSD
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
# You can assign a default route
|
||||||
|
#defaultroute="192.168.0.1"
|
||||||
|
#defaultroute6="2001:a:b:c"
|
@ -1,11 +1,16 @@
|
|||||||
|
|
||||||
|
# You can assign a default route
|
||||||
|
#defaultroute="gw 192.168.0.1"
|
||||||
|
#defaultroute6="gw 2001:a:b:c"
|
||||||
|
|
||||||
# ifconfig under Linux is not that powerful and doesn't easily handle
|
# ifconfig under Linux is not that powerful and doesn't easily handle
|
||||||
# multiple addresses
|
# multiple addresses
|
||||||
# On the other hand, ip (iproute2) is quite powerful and is also supported
|
# On the other hand, ip (iproute2) is quite powerful and is also supported
|
||||||
#ip_eth0="192.168.0.10/24; 192.168.10.10/24"
|
#ip_eth0="192.168.0.10/24; 192.168.10.10/24"
|
||||||
|
|
||||||
# You can also use ip to add the default route.
|
# You can also use ip to add the default route.
|
||||||
#defaultiproute="192.168.0.1"
|
#defaultiproute="via 192.168.0.1"
|
||||||
#defaultiproute6="2001:a:b:c"
|
#defaultiproute6="via 2001:a:b:c"
|
||||||
|
|
||||||
# ip doesn't handle MTU like ifconfig, but we can do it like so
|
# ip doesn't handle MTU like ifconfig, but we can do it like so
|
||||||
#ifup_eth0="ip link set \$int mtu 1500"
|
#ifup_eth0="ip link set \$int mtu 1500"
|
||||||
|
@ -9,10 +9,6 @@
|
|||||||
# You should note that we don't stop the network at system shutdown by default.
|
# You should note that we don't stop the network at system shutdown by default.
|
||||||
# If you really need this, then set shutdown_network=YES
|
# If you really need this, then set shutdown_network=YES
|
||||||
|
|
||||||
# You can assign a default route
|
|
||||||
#defaultroute="192.168.0.1"
|
|
||||||
#defaultroute6="2001:a:b:c"
|
|
||||||
|
|
||||||
# Lastly, the interfaces variable pulls in virtual interfaces that cannot
|
# Lastly, the interfaces variable pulls in virtual interfaces that cannot
|
||||||
# be automatically detected.
|
# be automatically detected.
|
||||||
#interfaces="br0 bond0 vlan0"
|
#interfaces="br0 bond0 vlan0"
|
||||||
|
@ -253,16 +253,11 @@ start()
|
|||||||
|
|
||||||
if [ -n "$defaultroute" ]; then
|
if [ -n "$defaultroute" ]; then
|
||||||
ebegin "Setting default route $defaultroute"
|
ebegin "Setting default route $defaultroute"
|
||||||
if [ "$RC_UNAME" = Linux -a \
|
route add default $defaultroute
|
||||||
"${defaultroute#dev }" = "$defaultroute" ]; then
|
|
||||||
route add default gw $defaultroute
|
|
||||||
else
|
|
||||||
route add default $defaultroute
|
|
||||||
fi
|
|
||||||
eend $?
|
eend $?
|
||||||
elif [ -n "$defaultiproute" ]; then
|
elif [ -n "$defaultiproute" ]; then
|
||||||
ebegin "Setting default route $defaultiproute"
|
ebegin "Setting default route $defaultiproute"
|
||||||
ip route add default via $defaultiproute
|
ip route add default $defaultiproute
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -270,9 +265,6 @@ start()
|
|||||||
ebegin "Setting default route $defaultroute6"
|
ebegin "Setting default route $defaultroute6"
|
||||||
if [ "$RC_UNAME" = Linux ]; then
|
if [ "$RC_UNAME" = Linux ]; then
|
||||||
routecmd="route -A inet6 add"
|
routecmd="route -A inet6 add"
|
||||||
if [ "${defaultroute6#dev }" = "$defaultroute6" ]; then
|
|
||||||
routecmd="$routecmd gw"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
routecmd="route -inet6 add"
|
routecmd="route -inet6 add"
|
||||||
fi
|
fi
|
||||||
@ -280,7 +272,7 @@ start()
|
|||||||
eend $?
|
eend $?
|
||||||
elif [ -n "$defaultiproute6" ]; then
|
elif [ -n "$defaultiproute6" ]; then
|
||||||
ebegin "Setting default route $defaultiproute6"
|
ebegin "Setting default route $defaultiproute6"
|
||||||
ip route add default via $defaultiproute6
|
ip -f inet6 route add default $defaultiproute6
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user