Changeset 84623c3


Ignore:
Timestamp:
Jan 17, 2013 4:19:55 PM (7 years ago)
Author:
Ted Faber <faber@…>
Branches:
master
Children:
e62fb86
Parents:
4241f3c
Message:

IP address override

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedkit/config_from_tunnelip.pl

    r4241f3c r84623c3  
    2121my $routedest;                  # Add host route to this address (if given)
    2222my $recordfile;                 # Record interfaces
     23my $forceip;                    # User overriddedn IP
     24my $forcemask;                  # User overriddedn netmask
    2325
    2426# Linux and FreeBSD use slightly different route syntax, so get the OS
     
    2729
    2830# Option parsing, --destination sets $routedest
    29 GetOptions('destination=s' => \$routedest, "record=s" => \$recordfile);
     31GetOptions('destination=s' => \$routedest, "record=s" => \$recordfile,
     32    'forceip=s' => \$forceip, 'forcemask=s' => \$forcemask);
    3033
    3134# Parse out the info about tunnelips
     
    4144
    4245die "No MAC information for tunnel.\n" unless $mac;
     46
     47# Let the user override the IP and mask if they know what they are doing.
     48$ip = $forceip if $forceip;
     49$netmask = $forcemask if $forcemask;
    4350
    4451# Use the emulab findif command to get the right interface to configure
Note: See TracChangeset for help on using the changeset viewer.