From 8c0d3db40fae2d015ac18481a9ac8c5b4da5769f Mon Sep 17 00:00:00 2001 From: robert <> Date: Tue, 2 Aug 2011 11:59:25 +0000 Subject: [PATCH] handle /var/db/mountdtab in the mountd script and not in nfsd --- src/etc/rc.d/mountd | 8 +++++++- src/etc/rc.d/nfsd | 6 ++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/etc/rc.d/mountd b/src/etc/rc.d/mountd index 22040923..fb1d7cfa 100644 --- a/src/etc/rc.d/mountd +++ b/src/etc/rc.d/mountd @@ -1,9 +1,15 @@ #!/bin/sh # -# $OpenBSD: mountd,v 1.1 2011/07/08 00:54:04 ajacoutot Exp $ +# $OpenBSD: mountd,v 1.2 2011/08/02 11:59:25 robert Exp $ daemon="/sbin/mountd" . /etc/rc.d/rc.subr +rc_pre() { + [ -s /etc/exports -a `sed -e '/^#/d' < /etc/exports | wc -l` -ne 0 ] && + rm -f /var/db/mountdtab && \ + echo -n > /var/db/mountdtab +} + rc_cmd $1 diff --git a/src/etc/rc.d/nfsd b/src/etc/rc.d/nfsd index 86aa27cf..cf4cf2e5 100644 --- a/src/etc/rc.d/nfsd +++ b/src/etc/rc.d/nfsd @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: nfsd,v 1.2 2011/08/02 11:50:39 robert Exp $ +# $OpenBSD: nfsd,v 1.3 2011/08/02 11:59:25 robert Exp $ daemon="/sbin/nfsd" @@ -11,9 +11,7 @@ pexp="(${daemon}*|nfsd: (master|server)$)" rc_reload=NO rc_pre() { - [ -s /etc/exports -a `sed -e '/^#/d' < /etc/exports | wc -l` -ne 0 ] && - rm -f /var/db/mountdtab && \ - echo -n > /var/db/mountdtab + [ -s /etc/exports -a `sed -e '/^#/d' < /etc/exports | wc -l` -ne 0 ] } rc_cmd $1