Commit 1cf8e633 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
MFC after:	1 week
parent db4b4021
......@@ -34,7 +34,9 @@ mountd_precmd()
rc_flags="${rc_flags} -R"
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
sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null
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