From a5bd0d0d2383a5da51e8785cfb5c762ce24f370a Mon Sep 17 00:00:00 2001 From: daniceexi Date: Tue, 30 Mar 2010 08:17:42 +0000 Subject: [PATCH] make the mac address used in the yaboot config file name in low case git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5603 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/yaboot.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/yaboot.pm b/xCAT-server/lib/xcat/plugins/yaboot.pm index 08bea97fd..00ad07a26 100644 --- a/xCAT-server/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server/lib/xcat/plugins/yaboot.pm @@ -160,8 +160,12 @@ 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}; + #special case for sles 11 + my $mac = lc($machash{$node}->[0]->{mac}); + if (! (grep /\:/, $mac) ) { + $mac =~ s/(..)(..)(..)(..)(..)(..)/$1:$2:$3:$4:$5:$6/; + } + my @mac_substr = split /\:/, $mac; my $sles_yaboot_link = sprintf("yaboot.conf-%s-%s-%s-%s-%s-%s", @mac_substr); unlink($tftpdir."/etc/".$pname); link($tftpdir."/etc/".$node,$tftpdir."/etc/".$pname);