From 68942d79c1313e910cefa6cf33ace6ae06350b01 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Tue, 24 Mar 2009 08:56:24 +0000 Subject: [PATCH] add one checkpoint for the neccessary stunnel for sles11_ppc64 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2963 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/sles.pm | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index c029cc893..59cf31b8d 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -286,6 +286,31 @@ sub mkinstall next; } + #before setting sles11 full installation, check if stunnel is in the right place + if ($os =~ /sles11/ && $arch eq "ppc64") { + unless ( -d "/install/post/otherpkgs/sles11/ppc64" ) + { + $callback->( + { + error => ["No such a directory: /install/post/otherpkgs/sles11/ppc64"], + errorcode => [1] + } + ); + } + opendir(DIR, "/install/post/otherpkgs/sles11/ppc64"); + my @tmp = grep { /^stunnel.*\.ppc64\.rpm$/ } readdir(DIR); + closedir DIR; + unless ( scalar @tmp> 0 && -r "/install/post/otherpkgs/sles11/ppc64/$rpms[0]" ) + { + $callback->( + { + error => ["No stunnel rpm package in /install/post/otherpkgs/sles11/ppc64"], + errorcode => [1] + } + ); + } + } + #Call the Template class to do substitution to produce a kickstart file in the autoinst dir my $tmperr; if (-r "$tmplfile") @@ -298,7 +323,7 @@ sub mkinstall ); #sles11 cannot find base-64bit and #stunnel in the autoyast file - if($os eq 'sles11') { + if($os =~ /sles11/) { my $SLES_YAST_FILE; open SLES_YAST_FILE, "/install/autoinst/$node"||\ return "Cannot open autoyast file for SLES11\n";