Browse Source

handle /var/db/mountdtab in the mountd script and not in nfsd

OPENBSD_5_0
robert 13 years ago
parent
commit
8c0d3db40f
2 changed files with 9 additions and 5 deletions
  1. +7
    -1
      src/etc/rc.d/mountd
  2. +2
    -4
      src/etc/rc.d/nfsd

+ 7
- 1
src/etc/rc.d/mountd View File

@ -1,9 +1,15 @@
#!/bin/sh #!/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" daemon="/sbin/mountd"
. /etc/rc.d/rc.subr . /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 rc_cmd $1

+ 2
- 4
src/etc/rc.d/nfsd View File

@ -1,6 +1,6 @@
#!/bin/sh #!/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" daemon="/sbin/nfsd"
@ -11,9 +11,7 @@ pexp="(${daemon}*|nfsd: (master|server)$)"
rc_reload=NO rc_reload=NO
rc_pre() { 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 rc_cmd $1

Loading…
Cancel
Save