Commit 5919cf32 authored by Mike Karels's avatar Mike Karels
Browse files

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 1cf8e633)
parent bb75580e
......@@ -34,7 +34,9 @@ mountd_precmd()
rc_flags="${rc_flags} -R"
else
force_depend rpcbind || return 1
if ! checkyesno nfsv4_server_enable; then
if checkyesno nfsv4_server_enable; then
sysctl vfs.nfsd.server_max_nfsvers=4 > /dev/null
else
sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null
fi
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment