Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102903981
D26938.id79267.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D26938.id79267.diff
View Options
Index: etc/defaults/rc.conf
===================================================================
--- etc/defaults/rc.conf
+++ etc/defaults/rc.conf
@@ -376,6 +376,7 @@
keyserv_enable="NO" # Run the SecureRPC keyserver (or NO).
keyserv_flags="" # Flags to keyserv (if enabled).
nfsv4_server_enable="NO" # Enable support for NFSv4
+nfsv4_server_only="NO" # Set NFS server to NFSv4 only
nfscbd_enable="NO" # NFSv4 client side callback daemon
nfscbd_flags="" # Flags for nfscbd
nfsuserd_enable="NO" # NFSv4 user/group name mapping daemon
Index: etc/rc.d/mountd
===================================================================
--- etc/rc.d/mountd
+++ etc/rc.d/mountd
@@ -20,13 +20,33 @@
mountd_precmd()
{
- force_depend rpcbind || return 1
+ # Load the modules now, so that the vfs.nfsd sysctl
+ # oids are available.
+ load_kld nfsd || return 1
+
+ # Do not force rpcbind to be running for an NFSv4 only server.
+ #
+ if checkyesno nfsv4_server_only; then
+ echo 'NFSv4 only server'
+ sysctl vfs.nfsd.server_min_nfsvers=4 > /dev/null
+ sysctl vfs.nfsd.server_max_nfsvers=4 > /dev/null
+ rc_flags="${rc_flags} -R"
+ else
+ force_depend rpcbind || return 1
+ fi
+
# mountd flags will differ depending on rc.conf settings
#
- if checkyesno nfs_server_enable ; then
+ if checkyesno nfs_server_enable || checkyesno nfsv4_server_only; then
if checkyesno weak_mountd_authentication; then
- rc_flags="${mountd_flags} -n"
+ if checkyesno nfsv4_server_only; then
+ echo -n 'weak_mountd_authentication '
+ echo -n 'incompatible with nfsv4_server_only, '
+ echo 'ignored'
+ else
+ rc_flags="${rc_flags} -n"
+ fi
fi
else
if checkyesno mountd_enable; then
Index: etc/rc.d/nfsd
===================================================================
--- etc/rc.d/nfsd
+++ etc/rc.d/nfsd
@@ -26,7 +26,7 @@
# Load the modules now, so that the vfs.nfsd sysctl
# oids are available.
- load_kld nfsd
+ load_kld nfsd || return 1
if checkyesno nfs_reserved_port_only; then
echo 'NFS on reserved port only=YES'
@@ -41,12 +41,15 @@
if checkyesno nfsv4_server_enable; then
sysctl vfs.nfsd.server_max_nfsvers=4 > /dev/null
- else
+ elif ! checkyesno nfsv4_server_only; then
echo 'NFSv4 is disabled'
sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null
fi
- force_depend rpcbind || return 1
+ if ! checkyesno nfsv4_server_only; then
+ force_depend rpcbind || return 1
+ fi
+
force_depend mountd || return 1
if [ -n "${nfs_server_vhost}" ]; then
command_args="-V \"${nfs_server_vhost}\""
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 1:30 PM (6 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14717320
Default Alt Text
D26938.id79267.diff (2 KB)
Attached To
Mode
D26938: Update mountd and nfsd rc.d scripts to use the "-R" option added by r375026
Attached
Detach File
Event Timeline
Log In to Comment