From: Jon Mason Date: Fri, 13 Nov 2009 00:28:24 +0000 (-0600) Subject: install.pl: rework logic determining whether to allow NFSRDMA X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=3d20270af2e273d544ca00e4cbc8e81fa00314ff;p=~aditr%2Fofed_scripts.git install.pl: rework logic determining whether to allow NFSRDMA It is possible to install NFSRDMA on unsupported distros by installing a newer kernel on an older distro. Unfortunately, this causes issues with trying to instal rnfs-utils and potentially other nasty side effects. By reducing the logic to check for the supported distros and the supported kernels only, then this should it prevent from happening. Also, the logic is much cleaner this way. This fixes bug 1825 Signed-Off-By: Jon Mason --- diff --git a/install.pl b/install.pl index d0f4cf2..56767b4 100755 --- a/install.pl +++ b/install.pl @@ -1713,25 +1713,12 @@ sub set_availability } # NFSRDMA - if ($subdistro ne "openSUSE" and $kernel =~ m/2.6.2[25]|2.6.27.*-*|2.6.30/) { + if (($distro eq "redhat5" or $subdistro eq "SLES10" or $subdistro eq "SLES11") and + $kernel =~ m/2.6.16.60-[0-9.]*-[A-Za-z0-9.]*|2.6.2[25]|2.6.27.*-*|2.6.30|el5/) { $kernel_modules_info{'nfsrdma'}{'available'} = 1; $packages_info{'rnfs-utils'}{'available'} = 1; $packages_info{'rnfs-utils-debuginfo'}{'available'} = 1; } - elsif ($kernel =~ m/2.6.16.60-[0-9.]*-[A-Za-z0-9.]*/) { - $kernel_modules_info{'nfsrdma'}{'available'} = 1; - $packages_info{'rnfs-utils'}{'available'} = 1; - $packages_info{'rnfs-utils-debuginfo'}{'available'} = 1; - } - elsif ($kernel =~ m/el5/) { - my $minor = (split '-', $kernel)[1]; - $minor =~ s/(\.el5).*//; - if ($minor > 53) { - $kernel_modules_info{'nfsrdma'}{'available'} = 1; - $packages_info{'rnfs-utils'}{'available'} = 1; - $packages_info{'rnfs-utils-debuginfo'}{'available'} = 1; - } - } # RDS - cause kernel panic on RHEL4. # BUG: https://bugs.openfabrics.org/show_bug.cgi?id=1766