Module Name:    src
Committed By:   hannken
Date:           Tue Feb 16 10:02:42 UTC 2021

Modified Files:
        src/etc/rc.d: mountall mountd

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


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/etc/rc.d/mountall src/etc/rc.d/mountd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/mountall
diff -u src/etc/rc.d/mountall:1.13 src/etc/rc.d/mountall:1.14
--- src/etc/rc.d/mountall:1.13	Sun Mar  1 15:22:55 2020
+++ src/etc/rc.d/mountall	Tue Feb 16 10:02:42 2021
@@ -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
 }
Index: src/etc/rc.d/mountd
diff -u src/etc/rc.d/mountd:1.13 src/etc/rc.d/mountd:1.14
--- src/etc/rc.d/mountd:1.13	Wed Nov 12 12:35:52 2008
+++ src/etc/rc.d/mountd	Tue Feb 16 10:02:42 2021
@@ -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
 }
 

Reply via email to