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@redhat.com>
This commit is contained in:
J. Bruce Fields 2011-06-21 20:50:12 -04:00
parent d37883f482
commit bff76bdca6
3 changed files with 19 additions and 30 deletions

View File

@ -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@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@redhat.com> 1.2.4-0
- Updated to latest upstream release: nfs-utils-1-2-4

View File

@ -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.

View File

@ -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.