FWIW -- it might be better to simply integrate in the new OS detect
stuff rather than patch up the old Distro.pm...
(just my $0.02)
Begin forwarded message:
From: [EMAIL PROTECTED]
Date: July 18, 2005 11:48:33 AM EDT
To: [EMAIL PROTECTED]
Subject: [Oscar-checkins] r3324 - trunk/lib/OSCAR
Reply-To: [email protected]
Author: efocht
Date: 2005-07-18 10:48:32 -0500 (Mon, 18 Jul 2005)
New Revision: 3324
Modified:
trunk/lib/OSCAR/Distro.pm
Log:
Added CentOS and ScientificLinux support in old distro recognition
routine.
They are treated like native RHEL.
Modified: trunk/lib/OSCAR/Distro.pm
===================================================================
--- trunk/lib/OSCAR/Distro.pm 2005-07-18 15:14:17 UTC (rev 3323)
+++ trunk/lib/OSCAR/Distro.pm 2005-07-18 15:48:32 UTC (rev 3324)
@@ -45,6 +45,8 @@
'aaa_version' => 'suse',
'aaa_base' => 'suse',
'debian_version' => 'debian',
+ 'sl-release' => 'sl', # Scientific Linux
+ 'centos-release' => 'centos',
};
############################################################
@@ -72,13 +74,22 @@
last;
}
}
- # special treatment for RHEL and clones
- if ($name eq "redhat" && $version =~ m/^3(ES|AS|WS)/) {
- $version = "3as";
+ # special treatment for RHEL
+ if ($name eq "redhat") {
+ if ($version =~ m/^3(ES|AS|WS)/) {
+ $version = "3as";
+ } elsif ($version =~ m/^4(ES|AS|WS)/) {
+ $version = "el4";
+ }
}
-
- if ($name eq "redhat" && $version =~ m/^4(ES|AS|WS)/) {
- $version = "el4";
+ # RHEL clones look like RHEL
+ if ($name eq "sl" || $name eq "centos") {
+ $name = "redhat";
+ if ($version =~ /^3/) {
+ $version = "3as";
+ } elsif ($version =~ /^4/) {
+ $version = "el4";
+ }
}
return (lc $name, lc $version);
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Oscar-checkins mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/oscar-checkins
--
{+} Jeff Squyres
{+} [EMAIL PROTECTED]
{+} http://www.lam-mpi.org/
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel