Page MenuHomeFreeBSD

D60044.id.diff
No OneTemporary

D60044.id.diff

diff --git a/libexec/rc/rc.d/mountd b/libexec/rc/rc.d/mountd
--- a/libexec/rc/rc.d/mountd
+++ b/libexec/rc/rc.d/mountd
@@ -13,7 +13,6 @@
rcvar="mountd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
-required_files="/etc/exports"
start_precmd="mountd_precmd"
extra_commands="reload"
@@ -73,6 +72,18 @@
load_rc_config nfsd
load_rc_config zfs
+# mountd needs at least one exports file, and gets /etc/zfs/exports as well
+# when ZFS sharing is enabled. Only require /etc/exports when it is the only
+# exports file, otherwise a ZFS-only server cannot start.
+#
+# The only exception is NFSv4 servers, which require /etc/exports, but ZFS
+# sharenfs exports have to add a "V4:" line in /etc/exports, but ZFS does not
+# do that.
+if ! checkyesno zfs_enable || [ ! -r /etc/zfs/exports ] ||
+ checkyesno nfsv4_server_enable || checkyesno nfsv4_server_only; then
+ required_files="/etc/exports"
+fi
+
# precmd is not compatible with svcj
mountd_svcj="NO"

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 4, 2:41 AM (6 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39873383
Default Alt Text
D60044.id.diff (986 B)

Event Timeline