Changeset 301e941


Ignore:
Timestamp:
May 24, 2010 9:56:00 AM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
aa9a417
Parents:
d56b168
Message:

fix aliases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedkit/federate.pl

    rd56b168 r301e941  
    9595    /Service:\s+(.*)/i && do { $services{$1}++;};
    9696    /PortalAlias:\s+(.*)/i && do { $aliases{$1}++;};
    97     /AddedNode:\s+(.*)/i && do { push(@added, $1)}++;};
     97    /AddedNode:\s+(.*)/i && do { push(@added, $1); };
    9898}
    9999
     
    126126
    127127# Add gateway aliases
    128 if ($services{'seer'} && !$has_control ) {
     128if (%aliases) {
    129129    if ( my $hent = gethostbyname($gateway) ) {
    130130        my $gwip = inet_ntoa($hent->addr_list->[0]);
    131131
    132132        for my $k (keys %aliases) {
    133             print $new_hosts "\n$gwip\t$k.$exp.$proj\n";
     133            if ($exp && $proj) {
     134                print $new_hosts "\n$gwip\t$k.$exp.$proj $k\n";
     135            }
     136            else {
     137                print $new_hosts "\n$gwip\t$k\n";
     138            }
    134139        }
    135140    }
Note: See TracChangeset for help on using the changeset viewer.