lockd revision 180070
1155131Srwatson#!/bin/sh 2244265Srwatson# 3157137Srwatson# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm 4155131Srwatson# $FreeBSD: head/etc/rc.d/lockd 180070 2008-06-27 15:45:17Z mtm $ 5185573Srwatson# 6173146Srwatson 7173146Srwatson# PROVIDE: lockd 8173146Srwatson# REQUIRE: nfsserver nfsclient nfsd rpcbind statd 9173146Srwatson# BEFORE: DAEMON 10173146Srwatson# KEYWORD: nojail 11186647Srwatson 12186647Srwatson. /etc/rc.subr 13186647Srwatson 14186647Srwatsonname="lockd" 15186647Srwatsonrcvar=rpc_lockd_enable 16186647Srwatsoncommand="/usr/sbin/rpc.${name}" 17186647Srwatsonstart_precmd='lockd_precmd' 18186647Srwatsonstop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' 19186647Srwatsonstatus_precmd=$stop_precmd 20186647Srwatson 21186647Srwatson# Make sure that we are either an NFS client or server, and that we get 22186647Srwatson# the correct flags from rc.conf(5). 23186647Srwatson# 24186647Srwatsonlockd_precmd() 25155131Srwatson{ 26155131Srwatson local ret 27155131Srwatson ret=0 28155131Srwatson 29155131Srwatson if ! checkyesno nfs_server_enable && ! checkyesno nfs_client_enable 30155131Srwatson then 31155131Srwatson ret=1 32155131Srwatson fi 33155131Srwatson if ! checkyesno rpcbind_enable && \ 34155131Srwatson ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 35155131Srwatson then 36155131Srwatson force_depend rpcbind || ret=1 37155131Srwatson fi 38155131Srwatson rc_flags=${rpc_lockd_flags} 39155131Srwatson return ${ret} 40155131Srwatson} 41155131Srwatson 42155131Srwatsonload_rc_config $name 43155131Srwatsonrun_rc_command $1 44155131Srwatson