freebsd-nq/etc/rc.d/nfsserver
Pawel Jakub Dawidek bd57d5b0f5 Mark scripts as not usable inside a jail by adding keyword 'nojail'.
Some suggestions from:	rwatson, Ruben de Groot <mail25@bzerk.org>
2004-03-08 12:25:05 +00:00

31 lines
489 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: nfsserver
# REQUIRE: NETWORKING mountcritremote
# KEYWORD: FreeBSD nojail
. /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
if ! kldload nfsserver; then
warn 'Could not load NFS server module'
return 1
fi
fi
return 0
}
load_rc_config $name
run_rc_command "$1"