Enable "/etc/zfs/exports" from "zfs share" in rc.d/mountd and rc.d/mountall.

This commit is contained in:
hannken 2021-02-16 10:02:42 +00:00
parent 0b10797fb6
commit 0c0601776b
2 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: mountall,v 1.13 2020/03/01 15:22:55 roy Exp $
# $NetBSD: mountall,v 1.14 2021/02/16 10:02:42 hannken Exp $
#
# REQUIRE: mountcritremote named ypbind
@ -20,6 +20,7 @@ mountall_start()
# may try and null mount paths on ZFS.
if checkyesno zfs; then
zfs mount -a
zfs share -a
fi
# Mount file systems noted in fstab.
@ -34,6 +35,7 @@ mountall_stop()
# Unmount ZFS file systems.
if checkyesno zfs; then
zfs unshare -a
zfs unmount -a
fi
}

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: mountd,v 1.13 2008/11/12 12:35:52 ad Exp $
# $NetBSD: mountd,v 1.14 2021/02/16 10:02:42 hannken Exp $
#
# PROVIDE: mountd
@ -19,6 +19,12 @@ mountd_precmd()
{
rm -f /var/db/mountdtab
( umask 022 ; > /var/db/mountdtab )
if checkyesno zfs; then
if [ ! -r /etc/zfs/exports ]; then
touch /etc/zfs/exports
fi
rc_flags="${rc_flags} /etc/exports /etc/zfs/exports"
fi
return 0
}