From 03533e3102b58d9f812f3b974c902cb311e4a04b Mon Sep 17 00:00:00 2001 From: angli-xcat Date: Tue, 28 Jun 2011 09:28:21 +0000 Subject: [PATCH] This is for SLES 11 SP1 SDK DVD support (Patch 1) ==================================================================== Patch Reason: Design changed, to minimize risk when doing a regular SLES11SP1 full install without SDK DVD copied. Patch detail: If we do a full install for SLES11SP1, and previously we did "copycds" with SDK DVD, we use compute.sdk.sles11.tmpl, otherwise use compute.sles11.tmpl. ==================================================================== ==================================================================== 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. 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@9972 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Template.pm | 8 +- xCAT-server/lib/xcat/plugins/sles.pm | 13 ++- .../xcat/install/sles/compute.sdk.sles11.tmpl | 94 +++++++++++++++++++ .../xcat/install/sles/compute.sles11.tmpl | 11 --- 4 files changed, 107 insertions(+), 19 deletions(-) create mode 100644 xCAT-server/share/xcat/install/sles/compute.sdk.sles11.tmpl diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 5e94d2f86..231f609f1 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -116,15 +116,11 @@ sub subvars { $inc =~ s/#INCLUDE:([^#^\n]+)#/includefile($1, 0, 0)/eg; $inc =~ s/#HOSTNAME#/$node/eg; - if($media_dir =~ /sles11/){ + 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 . "/1"; + my $sles_sdk_media = "http://" . $tftpserver->{tftpserver} . $media_dir . "/sdk1"; - system("find $media_dir|grep sdk1"); - if($? == 0){ - $sles_sdk_media =~ s/1$/sdk1/g; - } $inc =~ s/#SLES_SDK_MEDIA#/$sles_sdk_media/eg; } if ($tmplerr) { diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 7e7612e95..188903941 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -628,8 +628,17 @@ sub mkinstall print "You should never get here! Programmer error!"; return; } - $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); } + 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); } + } $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); } diff --git a/xCAT-server/share/xcat/install/sles/compute.sdk.sles11.tmpl b/xCAT-server/share/xcat/install/sles/compute.sdk.sles11.tmpl new file mode 100644 index 000000000..09e91c127 --- /dev/null +++ b/xCAT-server/share/xcat/install/sles/compute.sdk.sles11.tmpl @@ -0,0 +1,94 @@ + + + + + + true + true + + false + false + mbr + + + + GMT + #TABLE:site:key=timezone:value# + + + english-us + + en_US + + false + false + false + true + + + non + + + + + + #SLES_SDK_MEDIA# + SuSE-Linux-SDK + / + false + SuSE-Linux-SDK + + + + + + /dev/sda + true + all + + + + + #INCLUDE_DEFAULT_PTRNLIST_S# + + + #INCLUDE_DEFAULT_PKGLIST_S# + + + + + + + root + #CRYPT:passwd:key=system,username=root:password# + true + + + + + + + true + true + local + linux + + + + dhcp + eth0 + onboot + + + + false + + + + + #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.sles# + #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/chroot.sles# + #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.sles11# + + + diff --git a/xCAT-server/share/xcat/install/sles/compute.sles11.tmpl b/xCAT-server/share/xcat/install/sles/compute.sles11.tmpl index 09e91c127..ec0b2d54e 100644 --- a/xCAT-server/share/xcat/install/sles/compute.sles11.tmpl +++ b/xCAT-server/share/xcat/install/sles/compute.sles11.tmpl @@ -29,17 +29,6 @@ non - - - - #SLES_SDK_MEDIA# - SuSE-Linux-SDK - / - false - SuSE-Linux-SDK - - - /dev/sda