From 9a03c49d6c8d92b24fd2597a2110d185c582551b Mon Sep 17 00:00:00 2001 From: Mike Makonnen Date: Fri, 24 Jan 2003 00:37:52 +0000 Subject: [PATCH] Cleanup as many instances of rc.conf variable use before calling load_rc_config(). Approved by: markm (mentor) dougb --- etc/rc.d/nfsd | 2 +- etc/rc.d/rtadvd | 17 ++++++++--------- etc/rc.d/ypbind | 2 +- etc/rc.d/yppasswdd | 2 +- etc/rc.d/ypserv | 2 +- etc/rc.d/ypset | 4 ++-- etc/rc.d/ypxfrd | 4 ++-- 7 files changed, 16 insertions(+), 17 deletions(-) diff --git a/etc/rc.d/nfsd b/etc/rc.d/nfsd index db765904eb5f..4f7bf88d7ae5 100755 --- a/etc/rc.d/nfsd +++ b/etc/rc.d/nfsd @@ -14,6 +14,7 @@ name="nfsd" rcvar=`set_rcvar nfs_server` command="/usr/sbin/${name}" +load_rc_config $name case ${OSTYPE} in FreeBSD) command_args="${nfs_server_flags}" @@ -51,5 +52,4 @@ nfsd_precmd() return 0 } -load_rc_config $name run_rc_command "$1" diff --git a/etc/rc.d/rtadvd b/etc/rc.d/rtadvd index 1398afd5b465..5e0a6dc8fe02 100755 --- a/etc/rc.d/rtadvd +++ b/etc/rc.d/rtadvd @@ -16,17 +16,16 @@ rcvar=`set_rcvar` command="/usr/sbin/${name}" start_precmd="rtadvd_precmd" -case ${OSTYPE} in -FreeBSD) - IS_GATEWAY="checkyesno ipv6_gateway_enable" - ;; -NetBSD) - IS_GATEWAY="eval [ \"$ip6mode\" = \"router\" ]" - ;; -esac - rtadvd_precmd() { + case ${OSTYPE} in + FreeBSD) + IS_GATEWAY="checkyesno ipv6_gateway_enable" + ;; + NetBSD) + IS_GATEWAY="eval [ \"$ip6mode\" = \"router\" ]" + ;; + esac if ! ${IS_GATEWAY}; then warn \ "${name} cannot be used on IPv6 host, only on an IPv6 router." diff --git a/etc/rc.d/ypbind b/etc/rc.d/ypbind index 0646e4cc12e2..0542e07a787f 100755 --- a/etc/rc.d/ypbind +++ b/etc/rc.d/ypbind @@ -15,6 +15,7 @@ name="ypbind" command="/usr/sbin/${name}" start_precmd="ypbind_precmd" +load_rc_config $name case ${OSTYPE} in FreeBSD) rcvar="nis_client_enable" @@ -44,5 +45,4 @@ ypbind_precmd() fi } -load_rc_config $name run_rc_command "$1" diff --git a/etc/rc.d/yppasswdd b/etc/rc.d/yppasswdd index c2d34b844395..0891f1064111 100755 --- a/etc/rc.d/yppasswdd +++ b/etc/rc.d/yppasswdd @@ -15,6 +15,7 @@ name="yppasswdd" command="/usr/sbin/rpc.${name}" start_precmd="yppasswdd_precmd" +load_rc_config $name case ${OSTYPE} in FreeBSD) rcvar="nis_yppasswdd_enable" @@ -50,5 +51,4 @@ yppasswdd_precmd() fi } -load_rc_config $name run_rc_command "$1" diff --git a/etc/rc.d/ypserv b/etc/rc.d/ypserv index 1619769cbb8a..657a37758937 100755 --- a/etc/rc.d/ypserv +++ b/etc/rc.d/ypserv @@ -14,6 +14,7 @@ name="ypserv" command="/usr/sbin/${name}" start_precmd="ypserv_precmd" +load_rc_config $name case ${OSTYPE} in FreeBSD) rcvar="nis_server_enable" @@ -49,5 +50,4 @@ ypserv_precmd() fi } -load_rc_config $name run_rc_command "$1" diff --git a/etc/rc.d/ypset b/etc/rc.d/ypset index 006e946a0f7f..135c5ba86d92 100644 --- a/etc/rc.d/ypset +++ b/etc/rc.d/ypset @@ -12,8 +12,9 @@ name="ypset" rcvar="nis_ypset_enable" command="/usr/sbin/${name}" -command_args="${nis_ypset_flags}" start_precmd="ypset_precmd" +load_rc_config $name +command_args="${nis_ypset_flags}" ypset_precmd() { @@ -35,5 +36,4 @@ ypset_precmd() fi } -load_rc_config $name run_rc_command "$1" diff --git a/etc/rc.d/ypxfrd b/etc/rc.d/ypxfrd index bfb3b164f498..eeb5a824b2ec 100644 --- a/etc/rc.d/ypxfrd +++ b/etc/rc.d/ypxfrd @@ -12,8 +12,9 @@ name="ypxfrd" rcvar="nis_ypxfrd_enable" command="/usr/sbin/rpc.${name}" -command_args="${nis_ypxfrd_flags}" start_precmd="ypxfrd_precmd" +load_rc_config $name +command_args="${nis_ypxfrd_flags}" ypxfrd_precmd() { @@ -35,5 +36,4 @@ ypxfrd_precmd() fi } -load_rc_config $name run_rc_command "$1"