Dimitry Andric 66aa9b8dc9 Whenever you boot with nfsv4_server_enable=NO (the default) in rc.conf,
the /etc/rc.d/nfsd script sets vfs.nfsd.server_max_nfsvers to 3.

Then, when you set nfsv4_server_enable=YES in rc.conf, and restart nfsd
via the rc.d script, without rebooting, the sysctl does *not* get reset
to max version 4, so NFSv4 still doesn't work.

Fix this by explicitly setting vfs.nfsd.server_max_nfsvers to 4 when
NFSv4 is requested.

I also added resetting of the nfs_privport sysctls, since this has the
same issue: nfs_reserved_port_only=YES in rc.conf sets the nfs_privport
sysctl to 1, but in the other case, the sysctl doesn't get reset to 0.

Reviewed by:	rmacklem
Silence from:	rc@
MFC after:	3 days
2011-11-05 16:47:47 +00:00
..
2007-12-08 22:40:31 +00:00
2011-05-17 07:40:13 +00:00
2010-09-27 15:55:39 +00:00
2011-04-25 05:57:01 +00:00
pf
2011-05-17 07:40:13 +00:00
2011-01-31 21:03:08 +00:00
2011-06-11 21:41:44 +00:00
2010-02-27 19:02:21 +00:00
2011-05-04 07:34:44 +00:00
2010-01-11 23:32:36 +00:00
2009-03-11 12:55:12 +00:00
2011-02-27 19:44:10 +00:00