-Suppress warning on blank /etc/hosts lines

-Fix expansion of sub-class-c networks (i.e. zone per node)

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@858 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-03-20 18:44:20 +00:00
parent 718ce6228b
commit d9d048d61d

View File

@ -116,7 +116,7 @@ LINE: while(<HOSTS>){
($data,$comment) = split('#', $_, 2);
($addr, $names) = split(' ', $data, 2);
if ($names =~ /^[ \t]*$/) {
$callback->({data=>["Bad line in hosts file ignored '$_'"]});
#$callback->({data=>["Bad line in hosts file ignored '$_'"]});
next LINE;
}
@ -142,7 +142,7 @@ LINE: while(<HOSTS>){
# Check that the address is in the address list.
$match = 'none';
foreach $netpat (@Netpatterns){
$match = $netpat, last if ($addr =~ /^$netpat\./);
$match = $netpat, last if ($addr =~ /^$netpat\./ or $addr =~ /^$netpat$/);
}
next if ($match eq 'none');