aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMike Makonnen <mtm@FreeBSD.org>2003-06-29 05:09:48 +0000
committerMike Makonnen <mtm@FreeBSD.org>2003-06-29 05:09:48 +0000
commitcf6b0ea705a3153c4effcd2bf4e373622be8dc87 (patch)
treeaf3492d2d82c4473eb1da15eda496547f9bab668 /etc
parentae620d4480a0559ab2135510e153a77ae5568c71 (diff)
Notes
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.d/netoptions2
-rw-r--r--etc/rc.d/routing29
2 files changed, 24 insertions, 7 deletions
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index f18632f2eb6c..da773c99231c 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -3,7 +3,7 @@
# $FreeBSD$
#
-# PROVIDE: network3
+# PROVIDE: netoptions
# REQUIRE: localdaemons
# BEFORE: securelevel
# KEYWORD: FreeBSD
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index 6478ab21e075..bce961e69426 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -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] | '')