HomeFreeBSD

mountd startup: enable NFSv4 if needed on restart

Description

mountd startup: enable NFSv4 if needed on restart

The mountd script in rc.d sets vfs.nfsd.server_max_nfsvers correctly
when it is run at system startup, relying on the kernel default.
However, if NFSv4 was enabled in /etc/rc.conf later, and the script
was re-run to restart mountd, the sysctl was still set to 3.
Set the sysctl to the right value in all cases.

Reviewed by: rmacklem

(cherry picked from commit 1cf8e6339e9add47107a6c9988a0f509225b7ef6)

Details

Provenance
karelsAuthored on Jul 3 2022, 11:04 PM
Parents
rG7b23ad67e9c1: rc.8: Reference the article about rc scripting
Branches
Unknown
Tags
Unknown