Ignore:
Timestamp:
Mar 12, 2010 2:37:32 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
7e50f69
Parents:
310d419
Message:

Set up all routing daemons from the fedkit and note interfaces we've added in a way that SEER's federated testbed will grok them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedkit/config_from_tunnelip.pl

    r310d419 rdc803a7  
    22
    33use strict;
     4use IO::File;
    45use IO::Pipe;
    56use Getopt::Long;
     
    1920my $router;                     # Router for the internet
    2021my $routedest;                  # Add host route to this address (if given)
     22my $recordfile;                 # Record interfaces
    2123
    2224# Linux and FreeBSD use slightly different route syntax, so get the OS
     
    2527
    2628# Option parsing, --destination sets $routedest
    27 GetOptions('destination=s' => \$routedest);
     29GetOptions('destination=s' => \$routedest, "record=s" => \$recordfile);
    2830
    2931# Parse out the info about tunnelips
     
    7173}
    7274else { warn "Destination but no router\n" if $routedest; }
     75if ($recordfile) {
     76    $netmask = "255.255.255.0" unless $netmask;
     77    my $rf = new IO::File(">>$recordfile") ||
     78        die "Can't open $recordfile:$!\n";
     79    print $rf "$ip:$interface:$mac:$netmask\n";
     80    $rf->close();
     81}
    7382exit(0);
Note: See TracChangeset for help on using the changeset viewer.