xref: /freebsd/libexec/rc/rc.d/lockd (revision faf25f48d601ae39f5752602f3020e2e92605625)
1#!/bin/sh
2#
3# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm
4# $FreeBSD$
5#
6
7# PROVIDE: lockd
8# REQUIRE: nfsclient rpcbind statd
9# BEFORE:  DAEMON
10# KEYWORD: nojail shutdown
11
12. /etc/rc.subr
13
14name="lockd"
15desc="NFS file locking daemon"
16rcvar=rpc_lockd_enable
17command="/usr/sbin/rpc.${name}"
18start_precmd='lockd_precmd'
19
20# Make sure that we are either an NFS client or server, and that we get
21# the correct flags from rc.conf(5).
22#
23lockd_precmd()
24{
25	force_depend rpcbind || return 1
26	force_depend statd rpc_statd || return 1
27
28	rc_flags=${rpc_lockd_flags}
29}
30
31load_rc_config $name
32run_rc_command $1
33