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