From 00f535776cc243466ac130c0340131dd251ebea0 Mon Sep 17 00:00:00 2001 From: angli-xcat Date: Wed, 29 Jun 2011 10:03:58 +0000 Subject: [PATCH] To make the code easier to maintain we decided not to select autoyast config template file (compute.sdk.sles11.tmpl/compute.sles11), instead if the user want to do a SDK included full install, he should prepare a customized template from compute.sdk.sles11.tmpl, and copy it to /install/custom directory. This is for SLES 11 SP1 SDK DVD support (Patch 1) ==================================================================== Patch Reason: Design changed, To make the code easier to maintain we decided not to automate select autoyast config template file (compute.sdk.sles11.tmpl/compute.sles11), Patch detail: If the user want to do a SDK DVD included full install, he/she should prepare a customized template originated from compute.sdk.sles11.tmpl, and copy it under /install/custom ==================================================================== ==================================================================== Target Dist: SLES 11 SP1, for both full install and statelite install Aim: To enable users to install packages from SDK DVD during installation user impact: If the user add packages in .pkglist files, he/she should first do 'copycds' using SDK DVD iso. For full install, the user should prepare a .tmpl file for autoyast By-effect: N/A Limitations: 2nd installation DVD and 2nd SDK DVD not supported, both carries source packages. It seems they are not recognized by autoyast, and it's of no use to install sources pkgs on CNs. ==================================================================== git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9980 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Template.pm | 11 +++++------ xCAT-server/lib/xcat/plugins/sles.pm | 14 +++----------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 231f609f1..4bf6f1c06 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -116,13 +116,12 @@ sub subvars { $inc =~ s/#INCLUDE:([^#^\n]+)#/includefile($1, 0, 0)/eg; $inc =~ s/#HOSTNAME#/$node/eg; - if($media_dir =~ /sles11.1/){ - my $nrtab = xCAT::Table->new("noderes"); - my $tftpserver = $nrtab->getNodeAttribs($node, ['tftpserver']); - my $sles_sdk_media = "http://" . $tftpserver->{tftpserver} . $media_dir . "/sdk1"; + my $nrtab = xCAT::Table->new("noderes"); + my $tftpserver = $nrtab->getNodeAttribs($node, ['tftpserver']); + my $sles_sdk_media = "http://" . $tftpserver->{tftpserver} . $media_dir . "/sdk1"; + + $inc =~ s/#SLES_SDK_MEDIA#/$sles_sdk_media/eg; - $inc =~ s/#SLES_SDK_MEDIA#/$sles_sdk_media/eg; - } if ($tmplerr) { close ($outh); return $tmplerr; diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 188903941..a7473a0ce 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -628,17 +628,9 @@ sub mkinstall print "You should never get here! Programmer error!"; return; } - if($os =~/sles11.1/ && -e "$installroot/$os/$arch/sdk1") - { - $profile_sdk = $profile . ".sdk"; - $tmplfile=xCAT::SvrUtils::get_tmpl_file_name("$installroot/custom/install/$plat", $profile_sdk, $os, $arch); - if (! $tmplfile) { $tmplfile=xCAT::SvrUtils::get_tmpl_file_name("$::XCATROOT/share/xcat/install/$plat", $profile_sdk, $os, $arch); } - } - else - { - $tmplfile=xCAT::SvrUtils::get_tmpl_file_name("$installroot/custom/install/$plat", $profile, $os, $arch); - if (! $tmplfile) { $tmplfile=xCAT::SvrUtils::get_tmpl_file_name("$::XCATROOT/share/xcat/install/$plat", $profile, $os, $arch); } - } + + $tmplfile=xCAT::SvrUtils::get_tmpl_file_name("$installroot/custom/install/$plat", $profile, $os, $arch); + if (! $tmplfile) { $tmplfile=xCAT::SvrUtils::get_tmpl_file_name("$::XCATROOT/share/xcat/install/$plat", $profile, $os, $arch); } $pkglistfile=xCAT::SvrUtils::get_pkglist_file_name("$installroot/custom/install/$plat", $profile, $os, $arch); if (! $pkglistfile) { $pkglistfile=xCAT::SvrUtils::get_pkglist_file_name("$::XCATROOT/share/xcat/install/$plat", $profile, $os, $arch); }