Changeset 55779d4 for fedkit


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

Location:
fedkit
Files:
3 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
  • fedkit/federate.pl

    r238db1e r55779d4  
    7979copy("/tmp/hosts", "/etc/hosts");
    8080
     81# If there are tunnelip interfaces to bring up, bring 'em
     82system("$perl -I/usr/local/federation/lib " .
     83    "/usr/local/federation/bin/config_from_tunnelip.pl");
     84
    8185
    8286if ($services{'userconfig'}) {
  • fedkit/prep_gateway.pl

    r238db1e r55779d4  
    4343    # Add the route to a peer.  Wait up to an hour for the peer's IP address to
    4444    # appear in the DNS.
    45     gateway_lib::add_route($peer, $router, 1, 60 *60);
     45    gateway_lib::add_route($peer, $router, 1, 60 *60)
     46        if $peer && $router;
    4647}
    4748
Note: See TracChangeset for help on using the changeset viewer.