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() ...@@ -34,7 +34,9 @@ mountd_precmd()
rc_flags="${rc_flags} -R" rc_flags="${rc_flags} -R"
else else
force_depend rpcbind || return 1 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 sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null
fi fi
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