Changeset dc803a7
- Timestamp:
- Mar 12, 2010 2:37:32 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 7e50f69
- Parents:
- 310d419
- Location:
- fedkit
- Files:
-
- 3 added
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
fedkit/Makefile
r310d419 rdc803a7 3 3 config_from_tunnelip.pl active_config.pl combo.pl \ 4 4 prep_gateway.pl port_forward.pl setup_bridge.pl import_key.pl \ 5 protogeni_routing.pl start_seer.pl5 gated_routing.pl start_seer.pl ospf_routing.pl 6 6 7 7 LIBRARIES=gateway_lib.pm 8 8 9 fedkit.tgz: ${LIBRARIES} ${BINARIES} ${PATCHES} 9 PACKAGES=libevent-1.3b.tbz openospfd-4.0.tbz 10 11 fedkit.tgz: ${LIBRARIES} ${BINARIES} ${PATCHES} ${PACKAGES} 10 12 mkdir -p /tmp/fedkit/local/federation/bin 11 13 mkdir -p /tmp/fedkit/local/federation/lib 12 14 mkdir -p /tmp/fedkit/local/federation/etc 15 mkdir -p /tmp/fedkit/local/federation/pkg 13 16 cp ${BINARIES} /tmp/fedkit/local/federation/bin 14 17 cp ${LIBRARIES} /tmp/fedkit/local/federation/lib 18 cp ${PACKAGES} /tmp/fedkit/local/federation/pkg 15 19 tar czf fedkit.tgz -C /tmp/fedkit local 16 20 rm -rf /tmp/fedkit -
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); -
fedkit/federate.pl
r310d419 rdc803a7 123 123 copy("/tmp/hosts", "/etc/hosts"); 124 124 125 # Ick. at least one of our images has gated in the wrong place (sigh). If 126 # so, fix it and restart routing. 127 if (!-x "/usr/sbin/gated" && -x "/sbin/gated" ) { 128 print "Linking to /sbin/gated and starting routing\n"; 129 symlink("/sbin/gated", "/usr/sbin/gated"); 130 system("$RC_ROUTE boot") if -x $RC_ROUTE; 131 } 132 133 # If there are tunnelip interfaces to bring up, bring 'em 125 126 # If there are tunnelip interfaces to bring up, bring 'em up. Record any such 127 # interfaces in /usr/local/federation/interfaces, so SEER can find them later. 134 128 system("$perl -I/usr/local/federation/lib " . 135 "/usr/local/federation/bin/config_from_tunnelip.pl"); 129 "/usr/local/federation/bin/config_from_tunnelip.pl " . 130 "--record=/usr/local/federation/etc/interfaces"); 131 132 if ($uname =~ /Linux/ ) { 133 system("$perl /usr/local/federation/bin/gated_routing.pl") 134 if -r "/usr/local/federation/bin/gated_routing.pl"; 135 } 136 elsif ($uname =~/FreeBSD/ ) { 137 # FreeBSD needs to have ospfs installed and a router config created and 138 # run. 139 system("$perl /usr/local/federation/bin/ospf_routing.pl") 140 if -r "/usr/local/federation/bin/ospf_routing.pl"; 141 } 136 142 137 143 -
fedkit/gated_routing.pl
r310d419 rdc803a7 6 6 7 7 my $IFCONFIG = "/sbin/ifconfig"; 8 my $GATED= "/usr/sbin/gated"; 8 my @GATEDS= ("/usr/sbin/gated", "/sbin/gated" ); 9 my $GATED; 9 10 10 11 my $fn = "/usr/local/federation/etc/gated.conf"; … … 21 22 } 22 23 $ifp->close(); 24 25 foreach my $g (@GATEDS) { 26 if (-x $g ) { 27 $GATED = $g; 28 last; 29 } 30 } 31 32 die "Can't find gated in " . join(",", @GATEDS) . "\n" unless $GATED; 23 33 24 34 my $f = new IO::File(">$fn") || die "Can't open $fn: $!\n";
Note: See TracChangeset
for help on using the changeset viewer.