[nfs-utils] Rely on crypto module autoloading in init scripts
J. Bruce Fields
bfields at fedoraproject.org
Mon Jul 4 13:33:14 UTC 2011
commit bff76bdca6d53c2c90d35ee3be00436ccb560157
Author: J. Bruce Fields <bfields at redhat.com>
Date: Tue Jun 21 20:50:12 2011 -0400
Rely on crypto module autoloading in init scripts
SECURE_NFS_MODS isn't necessary any more as we'll autoload any crypto
modules we need, so rpcsec_gss_krb5 is all we need to load. Even that
we could autoload as well, but that will require a kernel fix, and to
support older kernels we should wait till that fix has been in for a
while.
Signed-off-by: J. Bruce Fields <bfields at redhat.com>
nfs-utils.spec | 6 +++++-
rpcgssd.init | 21 +++++++--------------
rpcsvcgssd.init | 22 +++++++---------------
3 files changed, 19 insertions(+), 30 deletions(-)
---
diff --git a/nfs-utils.spec b/nfs-utils.spec
index 881cba2..1209b28 100644
--- a/nfs-utils.spec
+++ b/nfs-utils.spec
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils
URL: http://sourceforge.net/projects/nfs
Version: 1.2.4
-Release: 0%{?dist}
+Release: 1%{?dist}
Epoch: 1
# group all 32bit related archs
@@ -250,6 +250,10 @@ fi
%attr(4755,root,root) /sbin/umount.nfs4
%changelog
+* Mon Jul 4 2011 J. Bruce Fields <bfields at redhat.com> 1.2.4-2
+- Rely on crypto module autoloading in init scripts
+- initscripts: just try to mount rpc_pipefs always
+
* Wed Jun 29 2011 Steve Dickson <steved at redhat.com> 1.2.4-0
- Updated to latest upstream release: nfs-utils-1-2-4
diff --git a/rpcgssd.init b/rpcgssd.init
index 86e621b..4428b50 100755
--- a/rpcgssd.init
+++ b/rpcgssd.init
@@ -54,23 +54,16 @@ case "$1" in
rm -f $LOCKFILE
echo -n $"Starting RPC gssd: "
- # List of kernel modules to load
- [ -z "${SECURE_NFS_MODS}" ] && SECURE_NFS_MODS="des rpcsec_gss_krb5"
-
# Make sure the rpc_pipefs filesystem is available
/bin/mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs > /dev/null 2>&1
- [ "${SECURE_NFS_MODS}" != "noload" ] && {
- [ -x /sbin/lsmod -a -x /sbin/modprobe ] && {
- for i in ${SECURE_NFS_MODS}; do
- if ! /sbin/lsmod | grep $i > /dev/null ; then
- /sbin/modprobe $i || {
- echo "Error: Unable to load '$i' security module."
- exit 6;
- }
- fi
- done
- }
+ [ -x /sbin/lsmod -a -x /sbin/modprobe ] && {
+ if ! /sbin/lsmod | grep rpcsec_gss_krb5 > /dev/null ; then
+ /sbin/modprobe rpcsec_gss_krb5 || {
+ echo "Error: Unable to load rpcsec_gss_krb5."
+ exit 6;
+ }
+ fi
}
# Start daemon.
diff --git a/rpcsvcgssd.init b/rpcsvcgssd.init
index 96d4c43..30b7cd8 100755
--- a/rpcsvcgssd.init
+++ b/rpcsvcgssd.init
@@ -47,25 +47,17 @@ case "$1" in
rm -f $LOCKFILE
echo -n $"Starting RPC svcgssd: "
- # List of kernel modules to load
- [ -z "${SECURE_NFS_MODS}" ] && SECURE_NFS_MODS="des rpcsec_gss_krb5"
# Make sure the rpc_pipefs filesystem is available
/bin/mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs > /dev/null 2>&1
- [ "${SECURE_NFS_MODS}" != "noload" ] && {
- [ -x /sbin/lsmod -a -x /sbin/modprobe ] && {
- # Load rpcsec modules
- for i in ${SECURE_NFS_MODS}
- do
- if ! /sbin/lsmod | grep $i > /dev/null ; then
- /sbin/modprobe $i || {
- echo "Error: Unable to load '$i' security module."
- exit 6;
- }
- fi
- done
- }
+ [ -x /sbin/lsmod -a -x /sbin/modprobe ] && {
+ if ! /sbin/lsmod | grep rpcsec_gss_krb5 > /dev/null ; then
+ /sbin/modprobe rpcsec_gss_krb5 || {
+ echo "Error: Unable to load rpcsec_gss_krb5."
+ exit 6;
+ }
+ fi
}
# Start daemon.
More information about the scm-commits
mailing list