freebsd-dev/etc/rc.d/nfsserver
Gordon Tetlow 27bc1b287e Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next.

Submitted by:	Mike Makonnen <makonnen@pacbell.net>
Reviewed by:	silence on -current and -hackers
Prodded by:	rwatson
2002-06-13 22:14:37 +00:00

31 lines
490 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: nfsserver
# REQUIRE: NETWORKING mountcritremote
# KEYWORD: FreeBSD
. /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"