mountd revision 168410
178344Sobrien#!/bin/sh 278344Sobrien# 398184Sgordon# $NetBSD: mountd,v 1.11 2002/01/31 01:26:06 lukem Exp $ 498184Sgordon# $FreeBSD: head/etc/rc.d/mountd 168410 2007-04-06 02:27:02Z pjd $ 578344Sobrien# 678344Sobrien 778344Sobrien# PROVIDE: mountd 8126636Smtm# REQUIRE: NETWORKING nfsserver rpcbind quota 9136224Smtm# KEYWORD: nojail 1078344Sobrien 1178344Sobrien. /etc/rc.subr 1278344Sobrien 1378344Sobrienname="mountd" 14101851Sgordonrcvar=`set_rcvar` 1599550Sgordoncommand="/usr/sbin/${name}" 1678344Sobrienrequired_files="/etc/exports" 1778344Sobrienstart_precmd="mountd_precmd" 1878344Sobrienextra_commands="reload" 1978344Sobrien 2078344Sobrienmountd_precmd() 2178344Sobrien{ 22124627Smtm if ! checkyesno rpcbind_enable && \ 23124627Smtm ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 24124627Smtm then 25124627Smtm force_depend rpcbind || return 1 26124627Smtm fi 27124627Smtm 28124627Smtm # mountd flags will differ depending on rc.conf settings 29124627Smtm # 30124628Smtm if checkyesno nfs_server_enable ; then 31124627Smtm if checkyesno weak_mountd_authentication; then 32150294Srodrigc rc_flags="${mountd_flags} -n" 3398184Sgordon fi 34124628Smtm else 35124627Smtm if checkyesno mountd_enable; then 36150294Srodrigc checkyesno weak_mountd_authentication && rc_flags="-n" 37124627Smtm fi 38124628Smtm fi 39168410Spjd 40168410Spjd if checkyesno zfs_enable ; then 41168410Spjd rc_flags="${rc_flags} /etc/exports /etc/zfs/exports" 42168410Spjd fi 43168410Spjd 4478344Sobrien rm -f /var/db/mountdtab 4598184Sgordon ( umask 022 ; > /var/db/mountdtab ) 4678344Sobrien return 0 4778344Sobrien} 4878344Sobrien 4978344Sobrienload_rc_config $name 5078344Sobrienrun_rc_command "$1" 51