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
This commit is contained in:
daniceexi 2010-03-30 08:17:42 +00:00
parent 55530c5ae0
commit a5bd0d0d23

View File

@ -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);