freebsd-dev/etc/rc.d/mountd
Rick Macklem 1e2cac7b7f Delete the /etc/rc.d/nfsserver script, since it is no
longer used by /etc/rc.d/nfsd and it is no longer necessary
to load the old nfs server by default, when nfs_server_enable="YES".

Tested by:	sgk at troutmask.apl.washington.edu
Reviewed by:	rc (Andrzej Tobola)
2011-07-08 00:49:50 +00:00

57 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: mountd
# REQUIRE: NETWORKING rpcbind quota
# KEYWORD: nojail shutdown
. /etc/rc.subr
name="mountd"
rcvar=`set_rcvar`
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
required_files="/etc/exports"
start_precmd="mountd_precmd"
extra_commands="reload"
mountd_precmd()
{
if ! checkyesno rpcbind_enable && \
! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
then
force_depend rpcbind || return 1
fi
# mountd flags will differ depending on rc.conf settings
#
if checkyesno nfs_server_enable ; then
if checkyesno weak_mountd_authentication; then
rc_flags="${mountd_flags} -n"
fi
else
if checkyesno mountd_enable; then
checkyesno weak_mountd_authentication && rc_flags="-n"
fi
fi
# If oldnfs_server_enable is yes, force use of the old NFS server
#
if checkyesno oldnfs_server_enable; then
rc_flags="-o ${rc_flags}"
fi
if checkyesno zfs_enable; then
rc_flags="${rc_flags} /etc/exports /etc/zfs/exports"
fi
rm -f /var/db/mountdtab
( umask 022 ; > /var/db/mountdtab )
return 0
}
load_rc_config $name
run_rc_command "$1"