mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
143085107b
* Space -> tabs conversion. * Removed blanks before semicolon in "if ... ; then". * Proper indentation of misindented lines. * Put a full stop after some comments. * Removed whitespace at end of line. Approved by: silence from gordon
52 lines
1004 B
Bash
Executable File
52 lines
1004 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: mountd,v 1.11 2002/01/31 01:26:06 lukem Exp $
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: mountd
|
|
# REQUIRE: NETWORKING mountall beforemountlkm nfsserver rpcbind quota
|
|
# KEYWORD: FreeBSD NetBSD
|
|
|
|
. /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()
|
|
{
|
|
case ${OSTYPE} in
|
|
FreeBSD)
|
|
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
|
|
#
|
|
case ${nfs_server_enable} in
|
|
[Yy][Ee][Ss])
|
|
if checkyesno weak_mountd_authentication; then
|
|
mountd_flags="${mountd_flags} -n"
|
|
fi
|
|
;;
|
|
*)
|
|
if checkyesno mountd_enable; then
|
|
checkyesno weak_mountd_authentication && mountd_flags="-n"
|
|
fi
|
|
esac
|
|
;;
|
|
esac
|
|
rm -f /var/db/mountdtab
|
|
( umask 022 ; > /var/db/mountdtab )
|
|
return 0
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|