Changeset dc803a7 for fedkit/config_from_tunnelip.pl
- Timestamp:
- Mar 12, 2010 2:37:32 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 7e50f69
- Parents:
- 310d419
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedkit/config_from_tunnelip.pl
r310d419 rdc803a7 2 2 3 3 use strict; 4 use IO::File; 4 5 use IO::Pipe; 5 6 use Getopt::Long; … … 19 20 my $router; # Router for the internet 20 21 my $routedest; # Add host route to this address (if given) 22 my $recordfile; # Record interfaces 21 23 22 24 # Linux and FreeBSD use slightly different route syntax, so get the OS … … 25 27 26 28 # Option parsing, --destination sets $routedest 27 GetOptions('destination=s' => \$routedest );29 GetOptions('destination=s' => \$routedest, "record=s" => \$recordfile); 28 30 29 31 # Parse out the info about tunnelips … … 71 73 } 72 74 else { warn "Destination but no router\n" if $routedest; } 75 if ($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 } 73 82 exit(0);
Note: See TracChangeset
for help on using the changeset viewer.