o Repocopied routing and netoptions from network2 and network3, respectively.
o Change the provider names. o Separate routing into two parts: static routing and routing options. The start command will run both parts, but they can be run separately using the static and options command, respectively: (/etc/rc.d/routing static; /etc/rc.d/routing options)
This commit is contained in:
parent
ae620d4480
commit
cf6b0ea705
@ -3,7 +3,7 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: network3
|
||||
# PROVIDE: netoptions
|
||||
# REQUIRE: localdaemons
|
||||
# BEFORE: securelevel
|
||||
# KEYWORD: FreeBSD
|
||||
|
@ -5,17 +5,31 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: network2
|
||||
# PROVIDE: routing
|
||||
# REQUIRE: netif ppp-user
|
||||
# KEYWORD: FreeBSD
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="network2"
|
||||
start_cmd="network2_start"
|
||||
stop_cmd=":"
|
||||
name="routing"
|
||||
start_cmd="routing_start"
|
||||
stop_cmd="routing_stop"
|
||||
extra_commands="options static"
|
||||
static_cmd="static_start"
|
||||
options_cmd="options_start"
|
||||
|
||||
network2_start()
|
||||
routing_start()
|
||||
{
|
||||
static_start
|
||||
options_start
|
||||
}
|
||||
|
||||
routing_stop()
|
||||
{
|
||||
route -n flush
|
||||
}
|
||||
|
||||
static_start()
|
||||
{
|
||||
case ${defaultrouter} in
|
||||
[Nn][Oo] | '')
|
||||
@ -31,10 +45,13 @@ network2_start()
|
||||
if [ -n "${static_routes}" ]; then
|
||||
for i in ${static_routes}; do
|
||||
eval route_args=\$route_${i}
|
||||
route add ${route_args}
|
||||
echo route add ${route_args}
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
options_start()
|
||||
{
|
||||
echo -n 'Additional routing options:'
|
||||
case ${tcp_extensions} in
|
||||
[Yy][Ee][Ss] | '')
|
||||
|
Loading…
Reference in New Issue
Block a user