From 31e2aad089dfe233c0eec0132eb69ae41a282d8b Mon Sep 17 00:00:00 2001 From: mxi1 Date: Mon, 12 Jan 2009 04:44:56 +0000 Subject: [PATCH] -fix bug#2493580, 64-bit and stunnel package are not available for SLES11 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2591 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Client.pm | 2 +- xCAT-server/lib/xcat/plugins/sles.pm | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index 9119f8ac6..a4b84e79f 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -230,7 +230,7 @@ sub plugin_command { @nodes = xCAT::NodeRange::noderange($req->{noderange}->[0]); if (xCAT::NodeRange::nodesmissed()) { # my $rsp = {errorcode=>1,error=>"Invalid nodes in noderange:".join(',',xCAT::NodeRange::nodesmissed)}; - #my $rsp->{serverdone} = {};#minjun + #my $rsp->{serverdone} = {}; print "Invalid nodes in noderangex:".join(',',xCAT::NodeRange::nodesmissed())."\n"; # if ($sock) { # print $sock XMLout($rsp,RootName=>'xcatresponse' ,NoAttr=>1); diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index e9d4b2d21..8b4b079ed 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -301,6 +301,27 @@ sub mkinstall "/install/autoinst/$node", $node ); + #sles11 cannot find base-64bit and + #stunnel in the autoyast file + if($os eq 'sles11') { + my $SLES_YAST_FILE; + open SLES_YAST_FILE, "/install/autoinst/$node"||\ + return "Cannot open autoyast file for SLES11\n"; + my $yast_content=""; + while() { + if($_ !~ m/base-64bit<\/pattern>| + stunnel<\/package>/) { + $yast_content .=$_; + } + } + close SLES_YAST_FILE; + #create one new autoyast file + system("rm /install/autoinst/$node"); + open SLES_YAST_FILE, ">/install/autoinst/$node" || \ + return "cannot open autoyast file for SLES11\n"; + print SLES_YAST_FILE $yast_content; + close SLES_YAST_FILE; + } } if ($tmperr)