diff options
author | gordon <gordon@FreeBSD.org> | 2002-06-13 22:14:37 +0000 |
---|---|---|
committer | gordon <gordon@FreeBSD.org> | 2002-06-13 22:14:37 +0000 |
commit | 9c5433cb225f7a4e56e87623ea2e4011179553a5 (patch) | |
tree | 3168589e209abd888b033397e3c46dee6131a116 /etc/rc.d/mountd | |
parent | 50d99cdfecd92f5323a18aa791a5b1cb9d8b7191 (diff) | |
download | FreeBSD-src-9c5433cb225f7a4e56e87623ea2e4011179553a5.zip FreeBSD-src-9c5433cb225f7a4e56e87623ea2e4011179553a5.tar.gz |
Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next.
Submitted by: Mike Makonnen <makonnen@pacbell.net>
Reviewed by: silence on -current and -hackers
Prodded by: rwatson
Diffstat (limited to 'etc/rc.d/mountd')
-rwxr-xr-x | etc/rc.d/mountd | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/etc/rc.d/mountd b/etc/rc.d/mountd index d1a64bf..7618aeb 100755 --- a/etc/rc.d/mountd +++ b/etc/rc.d/mountd @@ -1,24 +1,59 @@ #!/bin/sh # -# $NetBSD: mountd,v 1.6 2000/06/02 22:54:11 fvdl Exp $ +# $NetBSD: mountd,v 1.11 2002/01/31 01:26:06 lukem Exp $ +# $FreeBSD$ # # PROVIDE: mountd -# REQUIRE: NETWORK mountall beforemountlkm rpcbind quota +# REQUIRE: NETWORKING mountall beforemountlkm nfsserver rpcbind quota +# KEYWORD: FreeBSD NetBSD . /etc/rc.subr name="mountd" -rcvar="nfs_server" -command="/usr/sbin/${name}" required_files="/etc/exports" start_precmd="mountd_precmd" extra_commands="reload" +case `${CMD_OSTYPE}` in +FreeBSD) + rcvar=`set_rcvar nfs_server` + command="/sbin/${name}" + ;; +NetBSD) + rcvar=`set_rcvar` + command="/usr/sbin/${name}" + ;; +esac + mountd_precmd() { + case `${CMD_OSTYPE}` in + FreeBSD) + if ! sysctl vfs.nfsrv >/dev/null 2>&1; then + force_depend nfsserver || return 1 + fi + if [ -z "`check_process rpcbind`" -a ! `checkyesno portmap_enable` ]; 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 single_mountd_enable ; then + checkyesno weak_mountd_authentication && mountd_flags="-n" + fi + esac + ;; + esac rm -f /var/db/mountdtab - echo -n > /var/db/mountdtab + ( umask 022 ; > /var/db/mountdtab ) return 0 } |