From bc597dfd8ed5c0dc635b526bc06e3e33dcceebf1 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 30 Sep 2011 14:32:05 +0000 Subject: [PATCH] Fix xnba erroneously creating pxelinux.cfg files git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10683 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/xnba.pm | 36 ---------------------------- 1 file changed, 36 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index b20b0c1e4..6287071e0 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -238,42 +238,6 @@ sub setstate { print $pcfg "LOCALBOOT 0\n"; close($pcfg); } - my $mactab = xCAT::Table->new('mac'); #to get all the hostnames - my %ipaddrs; - unless (inet_aton($node)) { - syslog("local1|err","xCAT unable to resolve IP in pxe plugin"); - return; - } - my $ip = inet_ntoa(inet_aton($node));; - unless ($ip) { - syslog("local1|err","xCAT unable to resolve IP in pxe plugin"); - return; - } - $ipaddrs{$ip} = 1; - if ($mactab) { - my $ment = $machash{$node}->[0]; #$mactab->getNodeAttribs($node,['mac']); - if ($ment and $ment->{mac}) { - my @macs = split(/\|/,$ment->{mac}); - foreach (@macs) { - if (/!(.*)/) { - if (inet_aton($1)) { - $ipaddrs{inet_ntoa(inet_aton($1))} = 1; - } - } - } - } - } - my $hassymlink = eval { symlink("",""); 1 }; - foreach $ip (keys %ipaddrs) { - my @ipa=split(/\./,$ip); - my $pname = sprintf("%02X%02X%02X%02X",@ipa); - unlink($tftpdir."/pxelinux.cfg/".$pname); - if ($hassymlink) { - symlink($node,$tftpdir."/pxelinux.cfg/".$pname); - } else { - link($tftpdir."/pxelinux.cfg/".$node,$tftpdir."/pxelinux.cfg/".$pname); - } - } }