Don't fail to load nfs module if sysctl is not available

https://bugzilla.redhat.com/show_bug.cgi?id=2100668
This commit is contained in:
Adam Williamson 2022-06-23 17:03:34 -07:00
parent d789857c8c
commit 6e6e0df23e
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,24 @@
--- nfs-utils-2.6.1/systemd/50-nfs.conf 2022-06-23 17:00:03.105176228 -0700
+++ nfs-utils-2.6.1/systemd/50-nfs.conf.new 2022-06-23 17:00:36.825358239 -0700
@@ -1,16 +1,16 @@
# Ensure all NFS systctl settings get applied when modules load
# sunrpc module supports "sunrpc.*" sysctls
-install sunrpc /sbin/modprobe --ignore-install sunrpc $CMDLINE_OPTS && /sbin/sysctl -q --pattern sunrpc --system
+install sunrpc /sbin/modprobe --ignore-install sunrpc $CMDLINE_OPTS && /sbin/sysctl -q --pattern sunrpc --system || :
# rpcrdma module supports sunrpc.svc_rdma.*
-install rpcrdma /sbin/modprobe --ignore-install rpcrdma $CMDLINE_OPTS && /sbin/sysctl -q --pattern sunrpc.svc_rdma --system
+install rpcrdma /sbin/modprobe --ignore-install rpcrdma $CMDLINE_OPTS && /sbin/sysctl -q --pattern sunrpc.svc_rdma --system || :
# lockd module supports "fs.nfs.nlm*" and "fs.nfs.nsm*" sysctls
-install lockd /sbin/modprobe --ignore-install lockd $CMDLINE_OPTS && /sbin/sysctl -q --pattern fs.nfs.n[sl]m --system
+install lockd /sbin/modprobe --ignore-install lockd $CMDLINE_OPTS && /sbin/sysctl -q --pattern fs.nfs.n[sl]m --system || :
# nfsv4 module supports "fs.nfs.*" sysctls (nfs_callback_tcpport and idmap_cache_timeout)
-install nfsv4 /sbin/modprobe --ignore-install nfsv4 $CMDLINE_OPTS && /sbin/sysctl -q --pattern 'fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout)' --system
+install nfsv4 /sbin/modprobe --ignore-install nfsv4 $CMDLINE_OPTS && /sbin/sysctl -q --pattern 'fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout)' --system || :
# nfs module supports "fs.nfs.*" sysctls
-install nfs /sbin/modprobe --ignore-install nfs $CMDLINE_OPTS && /sbin/sysctl -q --pattern fs.nfs --system
+install nfs /sbin/modprobe --ignore-install nfs $CMDLINE_OPTS && /sbin/sysctl -q --pattern fs.nfs --system || :

View File

@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils Name: nfs-utils
URL: http://linux-nfs.org/ URL: http://linux-nfs.org/
Version: 2.6.1 Version: 2.6.1
Release: 2.rc7%{?dist} Release: 3.rc7%{?dist}
Epoch: 1 Epoch: 1
# group all 32bit related archs # group all 32bit related archs
@ -26,6 +26,9 @@ Patch103: nfs-utils-2.3.1-systemd-gssproxy-restart.patch
Patch104: nfs-utils-2.3.3-man-tcpwrappers.patch Patch104: nfs-utils-2.3.3-man-tcpwrappers.patch
Patch105: nfs-utils-2.3.3-nfsconf-usegssproxy.patch Patch105: nfs-utils-2.3.3-nfsconf-usegssproxy.patch
Patch106: nfs-utils-2.4.2-systemd-svcgssd.patch Patch106: nfs-utils-2.4.2-systemd-svcgssd.patch
# Don't fail to load nfs module if sysctl isn't available
# https://bugzilla.redhat.com/show_bug.cgi?id=2100668
Patch107: nfs-utils-2.6.2-nosysctl-module-fail.patch
Provides: exportfs = %{epoch}:%{version}-%{release} Provides: exportfs = %{epoch}:%{version}-%{release}
Provides: nfsstat = %{epoch}:%{version}-%{release} Provides: nfsstat = %{epoch}:%{version}-%{release}
@ -465,6 +468,9 @@ fi
%{_mandir}/*/nfsiostat.8.gz %{_mandir}/*/nfsiostat.8.gz
%changelog %changelog
* Thu Jun 23 2022 Adam Williamson <awilliam@redhat.com> - 2.6.1-3.rc7
- Don't fail to load nfs module if sysctl is not available (bz 2100668)
* Thu Jun 23 2022 Steve Dickson <steved@redhat.com> 2.6.1-2.rc7 * Thu Jun 23 2022 Steve Dickson <steved@redhat.com> 2.6.1-2.rc7
- Updated to the latest RC release: nfs-utils-2-6-2-rc6 (bz 2099697) - Updated to the latest RC release: nfs-utils-2-6-2-rc6 (bz 2099697)