kcollect - Adjust Mops right hand on graph
[dragonfly.git] / etc / rc.d / nfsd
blob578e850cc129649b183c971a68bcc4761e4f8b18
1 #!/bin/sh
3 # $NetBSD: nfsd,v 1.4 2001/06/16 06:13:10 lukem Exp $
4 # $FreeBSD: src/etc/rc.d/nfsd,v 1.9 2003/01/24 00:37:52 mtm Exp $
7 # PROVIDE: nfsd
8 # REQUIRE: mountd
9 # KEYWORD: shutdown
11 . /etc/rc.subr
13 name="nfsd"
14 rcvar=`set_rcvar nfs_server`
15 command="/sbin/${name}"
16 load_rc_config $name
17 command_args="${nfs_server_flags}"
18 start_precmd="nfsd_precmd"
19 sig_stop="USR1"
21 nfsd_precmd()
23 if ! ${SYSCTL} -q vfs.nfs >/dev/null; then
24 force_depend nfsserver || return 1
27 if ! checkyesno rpcbind_enable && \
28 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
29 then
30 force_depend rpcbind || return 1
33 if ! checkyesno mountd_enable && \
34 ! /etc/rc.d/mountd forcestatus 1>/dev/null 2>&1
35 then
36 force_depend mountd || return 1
39 if checkyesno nfs_reserved_port_only; then
40 echo 'NFS on reserved port only=YES'
41 ${SYSCTL_W} vfs.nfs.nfs_privport=1 >/dev/null
43 return 0
46 run_rc_command "$1"