1#!/bin/sh 2# 3# $NetBSD: mountd,v 1.11 2002/01/31 01:26:06 lukem Exp $
| 1#!/bin/sh 2# 3# $NetBSD: mountd,v 1.11 2002/01/31 01:26:06 lukem Exp $
|
4# $FreeBSD: head/etc/rc.d/mountd 124616 2004-01-17 10:16:38Z mtm $
| 4# $FreeBSD: head/etc/rc.d/mountd 124627 2004-01-17 11:25:16Z mtm $
|
5# 6 7# PROVIDE: mountd 8# REQUIRE: NETWORKING mountall beforemountlkm nfsserver rpcbind quota 9# KEYWORD: FreeBSD 10 11. /etc/rc.subr 12 13name="mountd" 14rcvar=`set_rcvar` 15command="/usr/sbin/${name}" 16required_files="/etc/exports" 17start_precmd="mountd_precmd" 18extra_commands="reload" 19 20mountd_precmd() 21{
| 5# 6 7# PROVIDE: mountd 8# REQUIRE: NETWORKING mountall beforemountlkm nfsserver rpcbind quota 9# KEYWORD: FreeBSD 10 11. /etc/rc.subr 12 13name="mountd" 14rcvar=`set_rcvar` 15command="/usr/sbin/${name}" 16required_files="/etc/exports" 17start_precmd="mountd_precmd" 18extra_commands="reload" 19 20mountd_precmd() 21{
|
22 case ${OSTYPE} in 23 FreeBSD) 24 if ! checkyesno rpcbind_enable && \ 25 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 26 then 27 force_depend rpcbind || return 1 28 fi
| 22 if ! checkyesno rpcbind_enable && \ 23 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 24 then 25 force_depend rpcbind || return 1 26 fi
|
29
| 27
|
30 # mountd flags will differ depending on rc.conf settings 31 # 32 case ${nfs_server_enable} in 33 [Yy][Ee][Ss]) 34 if checkyesno weak_mountd_authentication; then 35 mountd_flags="${mountd_flags} -n" 36 fi 37 ;; 38 *) 39 if checkyesno mountd_enable; then 40 checkyesno weak_mountd_authentication && mountd_flags="-n" 41 fi 42 esac
| 28 # mountd flags will differ depending on rc.conf settings 29 # 30 case ${nfs_server_enable} in 31 [Yy][Ee][Ss]) 32 if checkyesno weak_mountd_authentication; then 33 mountd_flags="${mountd_flags} -n" 34 fi
|
43 ;;
| 35 ;;
|
| 36 *) 37 if checkyesno mountd_enable; then 38 checkyesno weak_mountd_authentication && mountd_flags="-n" 39 fi
|
44 esac 45 rm -f /var/db/mountdtab 46 ( umask 022 ; > /var/db/mountdtab ) 47 return 0 48} 49 50load_rc_config $name 51run_rc_command "$1"
| 40 esac 41 rm -f /var/db/mountdtab 42 ( umask 022 ; > /var/db/mountdtab ) 43 return 0 44} 45 46load_rc_config $name 47run_rc_command "$1"
|