7 # REQUIRE: mountd hostname gssd nfsuserd
8 # KEYWORD: nojail shutdown
13 rcvar=`set_rcvar nfs_server`
14 command="/usr/sbin/${name}"
17 start_precmd="nfsd_precmd"
22 if checkyesno oldnfs_server_enable; then
23 rc_flags="-o ${nfs_server_flags}"
25 # Load the module now, so that the vfs.nfsrv sysctl
29 if checkyesno nfs_reserved_port_only; then
30 echo 'NFS on reserved port only=YES'
31 sysctl vfs.nfsrv.nfs_privport=1 > /dev/null
34 rc_flags="${nfs_server_flags}"
36 # Load the modules now, so that the vfs.nfsd sysctl
40 if checkyesno nfs_reserved_port_only; then
41 echo 'NFS on reserved port only=YES'
42 sysctl vfs.nfsd.nfs_privport=1 > /dev/null
45 if checkyesno nfsv4_server_enable; then
46 if ! checkyesno nfsuserd_enable && \
47 ! /etc/rc.d/nfsuserd forcestatus 1>/dev/null 2>&1
49 if ! force_depend nfsuserd; then
50 err 1 "Cannot run nfsuserd"
54 echo 'NFSv4 is disabled'
55 sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null
59 if ! checkyesno rpcbind_enable && \
60 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
62 force_depend rpcbind || return 1
65 if ! checkyesno mountd_enable && \
66 ! /etc/rc.d/mountd forcestatus 1>/dev/null 2>&1
68 force_depend mountd || return 1