Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174424582
D60044.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
986 B
Referenced Files
None
Subscribers
None
D60044.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D60044: rc.d/mountd: Require /etc/exports only when there is no other exports file
Attached
Detach File
Event Timeline
Log In to Comment