fix for yaboot problem on SLES 11 PPC: use the yaboot file from SLES 11 CD, and create additional yaboot configuration link for this special case

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3119 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhanx 2009-04-08 02:58:39 +00:00
parent 66569a2d6c
commit 43f2118c63
2 changed files with 22 additions and 2 deletions

View File

@ -400,6 +400,11 @@ sub mkinstall
{
copy("/install/$os/$arch/1/suseboot/inst64",
"/tftpboot/xcat/$os/$arch");
#special case for sles 11
if ( $os eq 'sles11' and -r "/install/$os/$arch/1/suseboot/yaboot")
{
copy("/install/$os/$arch/1/suseboot/yaboot", "/tftpboot/");
}
}
$doneimgs{"$os|$arch"} = 1;
}

View File

@ -155,11 +155,26 @@ sub setstate {
foreach $ip (keys %ipaddrs) {
my @ipa=split(/\./,$ip);
my $pname = sprintf("%02x%02x%02x%02x",@ipa);
#special case for sles 11
my @mac_substr = split /\:/, $machash{$node}->[0]->{mac};
my $sles11_special_link = sprintf("yaboot.conf-%s-%s-%s-%s-%s-%s", @mac_substr);
unlink($tftpdir."/etc/".$pname);
if ( $kern->{'kernel'} =~ /sles11\/ppc64\/inst64$/) #special case for sles 11
{
unlink($tftpdir . $sles11_special_link);
}
if ($hassymlink) {
symlink($node,$tftpdir."/etc/".$pname);
symlink($node,$tftpdir."/etc/".$pname);
if ( $kern->{'kernel'} =~ /sles11\/ppc64\/inst64$/) #special case for sles 11
{
symlink($tftpdir."/etc/".$node, $tftpdir . '/' . $sles11_special_link);
}
} else {
link($tftpdir."/etc/".$node,$tftpdir."/etc/".$pname);
link($tftpdir."/etc/".$node,$tftpdir."/etc/".$pname);
if ( $kern->{'kernel'} =~ /sles11\/ppc64\/inst64$/) #special case for sles 11
{
link($tftpdir."/etc/".$node, $tftpdir . '/' . $sles11_special_link);
}
}
}
}