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