mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
337338ee00
makes any sense. Discussed with: dougb, brooks MFC after: 3 days
31 lines
481 B
Bash
31 lines
481 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: nfsserver
|
|
# REQUIRE: NETWORKING mountcritremote
|
|
# KEYWORD: 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"
|