mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-23 19:28:36 +00:00
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
This commit is contained in:
parent
db4b40213a
commit
1cf8e6339e
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue