summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2009-09-12 22:19:48 +0000
committerhrs <hrs@FreeBSD.org>2009-09-12 22:19:48 +0000
commit50032d4374d96a00af841fefa7a3e0979ddb1beb (patch)
treea1e4921fb0701652e351eeac0d6b2bb30030fbfc /etc/rc.d
parentcc29e78397759e3f12b8587351da540a33307d95 (diff)
downloadFreeBSD-src-50032d4374d96a00af841fefa7a3e0979ddb1beb.zip
FreeBSD-src-50032d4374d96a00af841fefa7a3e0979ddb1beb.tar.gz
Add an extension of set_rcvar(), a new function set_rcvar_obsolete(),
and $desc. The set_rcvar_obsolete() is for displaying an obsolete variable and the new one. More specifically, a warning is displayed when a variable is removed or changed in the source tree and the user still defines the old one. $router* and $ipv6_router* are replaced with $routed_* and $route6d_* for consistency. The old variables still work but can be removed in the future. MFC after: 3 days
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-xetc/rc.d/route6d17
-rwxr-xr-xetc/rc.d/routed13
2 files changed, 12 insertions, 18 deletions
diff --git a/etc/rc.d/route6d b/etc/rc.d/route6d
index f8a2bca..a94c3e4 100755
--- a/etc/rc.d/route6d
+++ b/etc/rc.d/route6d
@@ -4,22 +4,17 @@
#
# PROVIDE: route6d
-# REQUIRE: network_ipv6
+# REQUIRE: netif routing
# KEYWORD: nojail
. /etc/rc.subr
name="route6d"
+rcvar=`set_rcvar`
-# XXX - Executable may be in a different location. The $name variable
-# is different from the variable in rc.conf(5) so the
-# subroutines in rc.subr won't catch it. In this case, it
-# is also needed by the eval statement in the FreeBSD conditional.
-#
-load_rc_config $name
-
-rcvar="ipv6_router_enable"
-command="${ipv6_router:-/usr/sbin/${name}}"
-eval ${name}_flags=\"${ipv6_router_flags}\"
+set_rcvar_obsolete ipv6_router_enable route6d_enable
+set_rcvar_obsolete ipv6_router route6d_program
+set_rcvar_obsolete ipv6_router_flags route6d_flags
+load_rc_config $name
run_rc_command "$1"
diff --git a/etc/rc.d/routed b/etc/rc.d/routed
index be4cebc..c0bd5f7 100755
--- a/etc/rc.d/routed
+++ b/etc/rc.d/routed
@@ -10,13 +10,12 @@
. /etc/rc.subr
name="routed"
+desc="network RIP and router discovery routing daemon"
+rcvar=`set_rcvar`
+
+set_rcvar_obsolete router_enable routed_enable
+set_rcvar_obsolete router routed_program
+set_rcvar_obsolete router_flags routed_flags
-# XXX - Executable may be in a different location. The $name variable
-# is different from the variable in rc.conf(5) so the
-# subroutines in rc.subr won't catch it.
-#
load_rc_config $name
-rcvar="router_enable"
-command="${router:-/sbin/${name}}"
-eval ${name}_flags=\"${router_flags}\"
run_rc_command "$1"
OpenPOWER on IntegriCloud