nfsd revision 124622
178344Sobrien#!/bin/sh 278344Sobrien# 398184Sgordon# $NetBSD: nfsd,v 1.4 2001/06/16 06:13:10 lukem Exp $ 498184Sgordon# $FreeBSD: head/etc/rc.d/nfsd 124622 2004-01-17 10:59:43Z mtm $ 578344Sobrien# 678344Sobrien 778344Sobrien# PROVIDE: nfsd 878344Sobrien# REQUIRE: mountd 9124616Smtm# KEYWORD: FreeBSD 1078344Sobrien 1178344Sobrien. /etc/rc.subr 1278344Sobrien 1378344Sobrienname="nfsd" 1498184Sgordonrcvar=`set_rcvar nfs_server` 1599550Sgordoncommand="/usr/sbin/${name}" 1678344Sobrien 17109770Smtmload_rc_config $name 18124622Smtmcommand_args="${nfs_server_flags}" 19124622Smtmstart_precmd="nfsd_precmd" 20124622Smtmsig_stop="USR1" 2198184Sgordon 2298184Sgordonnfsd_precmd() 2398184Sgordon{ 2498184Sgordon if ! sysctl vfs.nfsrv >/dev/null 2>&1; then 2598184Sgordon force_depend nfsserver || return 1 2698184Sgordon fi 2798184Sgordon 28101851Sgordon if ! checkyesno rpcbind_enable && \ 29101851Sgordon ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 30101851Sgordon then 31101851Sgordon force_depend rpcbind || return 1 32101851Sgordon fi 33101851Sgordon 34101851Sgordon if ! checkyesno mountd_enable && \ 35101851Sgordon ! /etc/rc.d/mountd forcestatus 1>/dev/null 2>&1 36101851Sgordon then 37101851Sgordon force_depend mountd || return 1 38101851Sgordon fi 39101851Sgordon 40104980Sschweikh if checkyesno nfs_reserved_port_only; then 41102154Sgordon echo 'NFS on reserved port only=YES' 4298184Sgordon sysctl vfs.nfsrv.nfs_privport=1 > /dev/null 4398184Sgordon fi 4498184Sgordon return 0 4598184Sgordon} 4698184Sgordon 4778344Sobrienrun_rc_command "$1" 48