diff options
author | hrs <hrs@FreeBSD.org> | 2009-09-12 22:19:48 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2009-09-12 22:19:48 +0000 |
commit | 50032d4374d96a00af841fefa7a3e0979ddb1beb (patch) | |
tree | a1e4921fb0701652e351eeac0d6b2bb30030fbfc /etc/rc.d/route6d | |
parent | cc29e78397759e3f12b8587351da540a33307d95 (diff) | |
download | FreeBSD-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/route6d')
-rwxr-xr-x | etc/rc.d/route6d | 17 |
1 files changed, 6 insertions, 11 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" |