-Fix implementation of '-a' on hostnames
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4933 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d9be41ccd6
commit
8219fcf64a
@ -56,6 +56,7 @@ sub build_line {
|
||||
my $domain=shift;
|
||||
my $othernames=shift;
|
||||
my @o_names=();
|
||||
my @n_names=();
|
||||
if (defined $othernames) {
|
||||
@o_names=split(/,| /, $othernames);
|
||||
}
|
||||
@ -70,9 +71,10 @@ sub build_line {
|
||||
$_="";
|
||||
}
|
||||
} elsif ($ADDNAMES) {
|
||||
$$othernames = $_.$domain." ".$othernames;
|
||||
unshift(@n_names,"$_.$domain");
|
||||
}
|
||||
}
|
||||
unshift(@o_names,@n_names);
|
||||
|
||||
if ($node =~ m/\.$domain$/i) {
|
||||
$longname = $node;
|
||||
@ -83,7 +85,7 @@ sub build_line {
|
||||
|
||||
$othernames=join(' ', @o_names);
|
||||
if ($LONGNAME) { return "$ip $longname $node $othernames\n"; }
|
||||
elsif ($OTHERNAMESFIRST) { return "$ip $othernames $node $longname\n"; }
|
||||
elsif ($OTHERNAMESFIRST) { return "$ip $othernames $longname $node\n"; }
|
||||
else { return "$ip $node $longname $othernames\n"; }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user