freebsd-dev/etc/rc.d/statd
Mike Makonnen 33eba7d495 My forced commit to note the repo-copy (naturally) changed the $FreeBSD$ keyword line,
so that when I applied the patch to my check-in tree the top half of my patch failed to
apply.  Off course I saw what I *expected* to see (the bottom half succeeded) and
didn't notice that it had failed to apply cleanly.

Approved by: re (bmah)
2007-08-18 04:08:53 +00:00

45 lines
931 B
Bash

#!/bin/sh
#
# $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $
# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm Exp
# $FreeBSD$
#
# PROVIDE: statd
# REQUIRE: nfsserver nfsclient nfsd rpcbind
# BEFORE: DAEMON
# KEYWORD: nojail
. /etc/rc.subr
name="statd"
rcvar=rpc_statd_enable
command="/usr/sbin/rpc.${name}"
start_precmd='statd_precmd'
stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable'
status_precmd=$stop_precmd
# Make sure that we are either an NFS client or server, and that we get
# the correct flags from rc.conf(5).
#
statd_precmd()
{
local ret
ret=0
if ! checkyesno nfs_server_enable && ! checkyesno nfs_client_enable
then
ret=1
fi
if ! checkyesno rpcbind_enable && \
! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
then
force_depend rpcbind || ret=1
fi
rc_flags=${rpc_statd_flags}
return ${ret}
}
load_rc_config $name
run_rc_command $1