Ignore:
Timestamp:
Feb 22, 2010 4:40:21 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
2b11a1d
Parents:
238db1e
Message:

Supporting nodes connected by transit networks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedkit/active_config.pl

    r238db1e r55779d4  
    4242exit(20) if $?;
    4343
    44 my $f = new IO::File($iface_file) || die "Can't open $iface_file: $!\n";
    45 my $ifnum = 0;
    4644
    4745print "Waiting for ssh on $peer\n";
     
    5250    "-i $ssh_privkey $peer ls", 5*60);
    5351
    54 while (<$f>) {
    55     /([[:alnum:]]+)\s+([\d\.]+)/ && do {
    56         my ($iface, $addr) = ($1, $2);
     52if (my $f = new IO::File($iface_file)) {
     53    my $ifnum = 0;
     54    while (<$f>) {
     55        /([[:alnum:]]+)\s+([\d\.]+)/ && do {
     56            my ($iface, $addr) = ($1, $2);
    5757
    58         my $cmd = "$ssh -w $ifnum:$ifnum -o \"Tunnel ethernet\" " .
    59             "-o \"StrictHostKeyChecking no\" -i $ssh_privkey " .
    60             "$peer perl -I$fedkit_dir/lib $fedkit_dir/bin/setup_bridge.pl " .
    61             "--tapno=$ifnum --dest=$addr &";
    62         system($cmd);
    63         die if $?;
    64         gateway_lib::bind_tap_to_iface($ifnum, $iface, $addr);
    65         $ifnum++;
    66     };
     58            my $cmd = "$ssh -w $ifnum:$ifnum -o \"Tunnel ethernet\" " .
     59                "-o \"StrictHostKeyChecking no\" -i $ssh_privkey " .
     60                "$peer perl -I$fedkit_dir/lib $fedkit_dir/bin/setup_bridge.pl " .
     61                "--tapno=$ifnum --dest=$addr &";
     62            system($cmd);
     63            die if $?;
     64            gateway_lib::bind_tap_to_iface($ifnum, $iface, $addr);
     65            $ifnum++;
     66        };
     67    }
     68    $f->close();
    6769}
    68 $f->close();
     70else {
     71    warn "Can't open $iface_file: $!\n";
     72}
    6973exit(0);
    7074
Note: See TracChangeset for help on using the changeset viewer.