From 026f06091cfcacfbd3463b3ed90e43e4190a4d5a Mon Sep 17 00:00:00 2001 From: daniceexi Date: Thu, 5 Nov 2009 09:18:28 +0000 Subject: [PATCH] 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 --- xCAT-server/lib/xcat/plugins/yaboot.pm | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/yaboot.pm b/xCAT-server/lib/xcat/plugins/yaboot.pm index 31cd9ce36..24201687a 100644 --- a/xCAT-server/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server/lib/xcat/plugins/yaboot.pm @@ -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); } }