diff options
author | mtm <mtm@FreeBSD.org> | 2007-08-17 07:58:26 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2007-08-17 07:58:26 +0000 |
commit | ccb2d02a33b0d030e0c05a983449474dfff2db13 (patch) | |
tree | 7afb2b616e3d35943e6c78f0b109bb6cbe7822b9 /etc/rc.d/lockd | |
parent | 5ec55efc5590002a959e6ebabdb8f97e97186864 (diff) | |
download | FreeBSD-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/lockd')
-rw-r--r-- | etc/rc.d/lockd | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/etc/rc.d/lockd b/etc/rc.d/lockd index e5b2c8c..9aa9d7f 100644 --- a/etc/rc.d/lockd +++ b/etc/rc.d/lockd @@ -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_lockd_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 |