Deleted Added
full compact
1#!/bin/sh
2#
3# $NetBSD: nfsd,v 1.4 2001/06/16 06:13:10 lukem Exp $
4# $FreeBSD: head/etc/rc.d/nfsd 99550 2002-07-07 22:19:08Z gordon $
5#
6
7# PROVIDE: nfsd
8# REQUIRE: mountd
9# KEYWORD: FreeBSD NetBSD
10
11. /etc/rc.subr
12
13name="nfsd"
14rcvar=`set_rcvar nfs_server`
15command="/usr/sbin/${name}"
16
17case `${CMD_OSTYPE}` in
18FreeBSD)
19 command_args="${nfs_server_flags}"
20 required_vars="portmap_enable"
21 start_precmd="nfsd_precmd"
22 ;;
23NetBSD)
24 required_vars="mountd rpcbind"
25 start_precmd=
26 ;;
27esac
28
29nfsd_precmd()
30{
31 if ! sysctl vfs.nfsrv >/dev/null 2>&1; then
32 force_depend nfsserver || return 1
33 fi
34
35 if checkyesno nfs_reserved_port_only ; then
36 echo -n ' NFS on reserved port only=YES'
37 sysctl vfs.nfsrv.nfs_privport=1 > /dev/null
38 fi
39 return 0
40}
41
42load_rc_config $name
43run_rc_command "$1"