summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/statd
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2007-08-17 07:58:26 +0000
committermtm <mtm@FreeBSD.org>2007-08-17 07:58:26 +0000
commitccb2d02a33b0d030e0c05a983449474dfff2db13 (patch)
tree7afb2b616e3d35943e6c78f0b109bb6cbe7822b9 /etc/rc.d/statd
parent5ec55efc5590002a959e6ebabdb8f97e97186864 (diff)
downloadFreeBSD-src-ccb2d02a33b0d030e0c05a983449474dfff2db13.zip
FreeBSD-src-ccb2d02a33b0d030e0c05a983449474dfff2db13.tar.gz
The rc.d/nfslocking file controls two servers: rpc.statd and rpc.lockd. It worked well
in most cases, except one. The 'restart' case was not working as expected. Specifically, it would stop both lockd and statd, but it would restart only statd (which appears first in the script). This is because rc.subr(8) contains code to guard against infinite recursion in the 'restart' casae. To fix this use the traditional approach of controlling only one server from one script by breaking out rc.d/nfslocking into its contituent parts: rc.d/lockd and rc.d/statd. Keep rc.d/nfslocking around but don't include it in the boot rcorder(8)ing. PR: conf/107316 Approved by: re (bmah) MFC after: 2 weeks
Diffstat (limited to 'etc/rc.d/statd')
-rw-r--r--etc/rc.d/statd29
1 files changed, 2 insertions, 27 deletions
diff --git a/etc/rc.d/statd b/etc/rc.d/statd
index e5b2c8c..fd2a78a 100644
--- a/etc/rc.d/statd
+++ b/etc/rc.d/statd
@@ -30,34 +30,9 @@ nfslocking_precmd()
then
force_depend rpcbind || ret=1
fi
-
- if [ $name = "statd" ]
- then
- rc_flags=${rpc_statd_flags}
- elif [ $name = "lockd" ]
- then
- rc_flags=${rpc_lockd_flags}
- fi
-
+ rc_flags=${rpc_statd_flags}
return ${ret}
}
-start_precmd="nfslocking_precmd"
-stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable'
-status_precmd=$stop_precmd
-
-# rpc.statd
-#
-name="statd"
-rcvar=rpc_statd_enable
-command="/usr/sbin/rpc.${name}"
-load_rc_config $name
-run_rc_command "$arg"
-
-# rpc.lockd
-#
-name="lockd"
-rcvar=rpc_lockd_enable
-command="/usr/sbin/rpc.${name}"
load_rc_config $name
-run_rc_command "$arg"
+run_rc_command $1
OpenPOWER on IntegriCloud