2002-06-13 22:14:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: nfsserver
|
|
|
|
# REQUIRE: NETWORKING mountcritremote
|
2004-03-08 12:25:05 +00:00
|
|
|
# KEYWORD: FreeBSD nojail
|
2002-06-13 22:14:37 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="nfsserver"
|
|
|
|
rcvar="nfs_server_enable"
|
|
|
|
start_cmd="nfsserver_start"
|
|
|
|
stop_cmd=":"
|
|
|
|
|
|
|
|
# Load nfs modules if they were not compiled into the kernel
|
|
|
|
nfsserver_start()
|
|
|
|
{
|
|
|
|
if ! sysctl vfs.nfsrv >/dev/null 2>&1; then
|
2002-10-12 10:31:31 +00:00
|
|
|
if ! kldload nfsserver; then
|
2002-06-13 22:14:37 +00:00
|
|
|
warn 'Could not load NFS server module'
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
fi
|
2002-10-12 10:31:31 +00:00
|
|
|
return 0
|
2002-06-13 22:14:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|