25 lines
426 B
Text
25 lines
426 B
Text
|
#!/bin/sh
|
||
|
#
|
||
|
# PROVIDE: nfslock
|
||
|
# REQUIRE: portmap
|
||
|
|
||
|
$_rc_subr_loaded . /etc/rc.subr
|
||
|
|
||
|
name="nfslock"
|
||
|
rcvar=$name
|
||
|
command="/usr/sbin/rpc.statd"
|
||
|
start_precmd="statd_precmd"
|
||
|
|
||
|
statd_precmd()
|
||
|
{
|
||
|
# Check for /proc/fs/nfsd
|
||
|
if grep -qs nfsd /proc/filesystems ; then
|
||
|
if ! grep -qs "nfsd /proc/fs/nfsd" /proc/mounts ; then
|
||
|
mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfsd
|
||
|
fi
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
load_rc_config $name
|
||
|
run_rc_command "$1"
|