git: 26203cca5262 - main - rc.d/mountd: Do not require /etc/exports

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Wed, 07 Oct 2026 16:53:38 UTC
The branch main has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=26203cca52621c215f60640bf59128dcd9780be7

commit 26203cca52621c215f60640bf59128dcd9780be7
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-10-07 16:53:28 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-10-07 16:53:28 +0000

    rc.d/mountd: Do not require /etc/exports
    
    mountd exits if it cannot read any exports files. Requiring
    /etc/exports, however, unconditionally stops mountd from starting on a
    server that exports ZFS datasets only (/etc/zfs/exports).
    
    Let sbin/mountd handle requirements itself, instead of hardcoding
    /etc/exports, which is also wrong, because different files can be
    specified in mountd_flags.
    
    This patch also works with nfsv4_server_enable="YES", by preserving the
    behavior of failing to start if there is no "V4:" line in the exports
    file, which is missing by default on ZFS-only exports.
    
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Reviewed by:    rmacklem, markj, emaste
    Differential Revision:  https://reviews.freebsd.org/D60044
---
 libexec/rc/rc.d/mountd | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libexec/rc/rc.d/mountd b/libexec/rc/rc.d/mountd
index dfd2431f9c35..08416d32876a 100755
--- a/libexec/rc/rc.d/mountd
+++ b/libexec/rc/rc.d/mountd
@@ -13,7 +13,6 @@ desc="Service remote NFS mount requests"
 rcvar="mountd_enable"
 command="/usr/sbin/${name}"
 pidfile="/var/run/${name}.pid"
-required_files="/etc/exports"
 start_precmd="mountd_precmd"
 extra_commands="reload"