defect: 2768352: add the yaboot configuration file as format yaboot.conf-%s-%s-%s-%s-%s-%s in /tftpboot/ for both redhat and sles, so that redhat also works well when using the yaboot from sles.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4485 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2009-11-05 09:18:28 +00:00
parent d2feb703a0
commit 026f06091c

View File

@ -162,25 +162,13 @@ sub setstate {
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);
my $sles_yaboot_link = sprintf("yaboot.conf-%s-%s-%s-%s-%s-%s", @mac_substr);
unlink($tftpdir."/etc/".$pname);
if ( $kern->{'kernel'} =~ /sles11\/ppc64\//) #special case for sles 11
{
unlink($tftpdir . "/" . $sles11_special_link);
}
#if ($hassymlink) {
# symlink($node,$tftpdir."/etc/".$pname);
# if ( $kern->{'kernel'} =~ /sles11\/ppc64\//) #special case for sles 11
# {
# symlink($tftpdir."/etc/".$node, $tftpdir . '/' . $sles11_special_link);
# }
#} else {
link($tftpdir."/etc/".$node,$tftpdir."/etc/".$pname);
if ( $kern->{'kernel'} =~ /sles11\/ppc64\//) #special case for sles 11
{
link($tftpdir."/etc/".$node, $tftpdir . '/' . $sles11_special_link);
}
#}
link($tftpdir."/etc/".$node,$tftpdir."/etc/".$pname);
# Add the yaboot.conf-%s-%s-%s-%s-%s-%s for both the rh and sles
unlink($tftpdir . "/" . $sles_yaboot_link);
link($tftpdir."/etc/".$node, $tftpdir . '/' . $sles_yaboot_link);
}
}