From 0e479d94e3713c3dcf0bbafc540a2655f39c8573 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Mon, 28 Jun 2010 13:46:51 +0000 Subject: [PATCH] Scientific Linux support: add the disc ID for SL5.5; Use the SL as the platform instead of sl, since sl easy to be confused with sles git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6613 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 2 +- xCAT-server/lib/perl/xCAT/SvrUtils.pm | 3 +- xCAT-server/lib/xcat/plugins/anaconda.pm | 39 +++++++++++++----------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index bb4a3b17c..7c3e824d7 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -301,7 +301,7 @@ sub makescript { if ($os =~ /rh.*/) { $platform = "rh"; } elsif ($os =~ /centos.*/) { $platform = "centos"; } elsif ($os =~ /fedora.*/) { $platform = "fedora"; } - elsif ($os =~ /sl.*/) { $platform = "sl"; } + elsif ($os =~ /SL.*/) { $platform = "SL"; } elsif ($os =~ /sles.*/) { $platform = "sles"; } elsif ($os =~ /aix.*/) { $platform = "aix"; } } diff --git a/xCAT-server/lib/perl/xCAT/SvrUtils.pm b/xCAT-server/lib/perl/xCAT/SvrUtils.pm index 1a2dad6d5..975ba5808 100644 --- a/xCAT-server/lib/perl/xCAT/SvrUtils.pm +++ b/xCAT-server/lib/perl/xCAT/SvrUtils.pm @@ -319,7 +319,7 @@ sub getsynclistfile() elsif ($os =~ /centos.*/) { $platform = "centos"; } elsif ($os =~ /fedora.*/) { $platform = "fedora"; } elsif ($os =~ /sles.*/) { $platform = "sles"; } - elsif ($os =~ /sl.*/) { $platform = "sl"; } + elsif ($os =~ /SL.*/) { $platform = "SL"; } elsif ($os =~ /AIX.*/) { $platform = "AIX"; } } @@ -344,6 +344,7 @@ sub getsynclistfile() elsif ($os =~ /centos.*/) { $platform = "centos"; } elsif ($os =~ /fedora.*/) { $platform = "fedora"; } elsif ($os =~ /sles.*/) { $platform = "sles"; } + elsif ($os =~ /SL.*/) { $platform = "SL"; } elsif ($os =~ /AIX.*/) { $platform = "AIX"; } elsif ($os =~ /win/) {$platform = "windows"; } } diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index edc802e3f..32e2174f4 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -59,12 +59,15 @@ my %distnames = ( "1210111941.792844" => "fedora9", "1227147467.285093" => "fedora10", "1227142402.812888" => "fedora10", - "1243981097.897160" => "fedora11", #x86_64 DVD ISO - "1257725234.740991" => "fedora12", #x86_64 DVD ISO + "1243981097.897160" => "fedora11", #x86_64 DVD ISO + "1257725234.740991" => "fedora12", #x86_64 DVD ISO + "1273712675.937554" => "fedora13", #x86_64 DVD ISO "1194512200.047708" => "rhas4.6", "1194512327.501046" => "rhas4.6", "1241464993.830723" => "rhas4.8", #x86-64 + + "1273608367.051780" => "SL5.5", #x86_64 DVD ISO ); my %numdiscs = ( "1156364963.862322" => 4, @@ -75,9 +78,9 @@ sub handled_commands { return { copycd => "anaconda", - mknetboot => "nodetype:os=(centos.*)|(rh.*)|(fedora.*)|(sl.*)", - mkinstall => "nodetype:os=(esx[34].*)|(centos.*)|(rh.*)|(fedora.*)|(sl.*)", - mkstatelite => "nodetype:os=(esx[34].*)|(centos.*)|(rh.*)|(fedora.*)|(sl.*)", + mknetboot => "nodetype:os=(centos.*)|(rh.*)|(fedora.*)|(SL.*)", + mkinstall => "nodetype:os=(esx[34].*)|(centos.*)|(rh.*)|(fedora.*)|(SL.*)", + mkstatelite => "nodetype:os=(esx[34].*)|(centos.*)|(rh.*)|(fedora.*)|(SL.*)", }; } @@ -948,7 +951,7 @@ sub copycd if ( $distname and $distname !~ /^centos/ and $distname !~ /^fedora/ - and $distname !~ /^sl/ + and $distname !~ /^SL/ and $distname !~ /^rh/) { @@ -987,13 +990,6 @@ sub copycd $distname = "centos5"; } } - elsif ($desc =~ /^LTS$/) - { - unless ($distname) - { - $distname = "sl5"; - } - } elsif ($desc =~ /^Fedora 8$/) { unless ($distname) @@ -1022,6 +1018,14 @@ sub copycd $distname = "rhels5"; } } + elsif ($desc =~ /^LTS$/) + { + unless ($distname) + { + $distname = "SL5"; + } + } + unless ($distname) { @@ -1136,14 +1140,15 @@ sub getplatform { { $platform = "fedora"; } - elsif ($os =~ /sl.*/) - { - $platform = "sl"; - } elsif ($os =~ /esx.*/) { $platform = "esx"; } + elsif ($os =~ /SL.*/) + { + $platform = "SL"; + } + return $platform; }