freebsd-nq/etc/rc.d/mountd
Mike Makonnen 337338ee00 Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days
2004-10-07 13:55:26 +00:00

46 lines
904 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: mountd,v 1.11 2002/01/31 01:26:06 lukem Exp $
# $FreeBSD$
#
# PROVIDE: mountd
# REQUIRE: NETWORKING nfsserver rpcbind quota
# KEYWORD: nojail
. /etc/rc.subr
name="mountd"
rcvar=`set_rcvar`
command="/usr/sbin/${name}"
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
mountd_flags="${mountd_flags} -n"
fi
else
if checkyesno mountd_enable; then
checkyesno weak_mountd_authentication && mountd_flags="-n"
fi
fi
rm -f /var/db/mountdtab
( umask 022 ; > /var/db/mountdtab )
return 0
}
load_rc_config $name
run_rc_command "$1"