- Timestamp:
- Sep 25, 2009 1:51:15 PM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-2.00, version-3.01, version-3.02
- Children:
- 6c1981f
- Parents:
- 0fa1729
- Location:
- fedkit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fedkit/Makefile
r0fa1729 r4702322 1 1 BINARIES=federate.sh smbmount.FreeBSD.pl smbmount.Linux.pl \ 2 make_hosts fed-tun.pl fed_evrepeater rc.fedaccounts 2 make_hosts fed-tun.pl fed_evrepeater rc.fedaccounts \ 3 config_from_tunnelip.pl 3 4 4 5 fedkit.tgz: ${BINARIES} ${PATCHES} -
fedkit/fed-tun.pl
r0fa1729 r4702322 76 76 my $remote_script_dir; # location of the other sides fed-tun.pl 77 77 my $event_repeater; # The pathname of the event repeater 78 my $remote_config_file; # Config file for the other side79 78 80 79 if ($#ARGV != 0 && !getopts('df:rn', \%opts)) { … … 135 134 $remote_script_dir = $opts{'remotescriptdir'} || "."; 136 135 $event_repeater = $opts{'eventrepeater'}; 137 $remote_config_file = $opts{'remoteconfigfile'}; 138 $remote_config_file = "-f $remote_config_file" if $remote_config_file; 136 my $listen_on = $opts{'sshlisten'}; 139 137 140 138 if (defined($opts{'fsname'})) { 141 push(@ssh_port_fwds,"-R :$SMBFS_PORT:$opts{'fsname'}:$SMBFS_PORT");139 push(@ssh_port_fwds,"-R $listen_on:$SMBFS_PORT:$opts{'fsname'}:$SMBFS_PORT"); 142 140 } 143 141 144 142 if (defined($opts{'bossname'})) { 145 push(@ssh_port_fwds, "-R :$TMCD_PORT:$opts{'bossname'}:$TMCD_PORT");143 push(@ssh_port_fwds, "-R $listen_on:$TMCD_PORT:$opts{'bossname'}:$TMCD_PORT"); 146 144 } 147 145 148 146 if (defined($opts{'eventservername'})) { 149 147 push(@ssh_port_fwds,"-R ". 150 " :$remote_pubsub_port:$opts{'eventservername'}:$PUBSUB_PORT");148 "$listen_on:$remote_pubsub_port:$opts{'eventservername'}:$PUBSUB_PORT"); 151 149 } 152 150 if (defined($opts{'remoteeventservername'})) { … … 157 155 # Forward connections to seer from remote TBs to control in this TB 158 156 if (defined($opts{'seercontrol'})) { 159 push(@ssh_port_fwds,"-R :$SEER_PORT:$opts{seercontrol}:$SEER_PORT");157 push(@ssh_port_fwds,"-R $listen_on:$SEER_PORT:$opts{seercontrol}:$SEER_PORT"); 160 158 } 161 159 … … 241 239 if ($type eq "control") { 242 240 foreach my $fwd (@ssh_port_fwds) { 243 system("$SSH -N $fwd - Nno \"StrictHostKeyChecking no\" ".241 system("$SSH -N $fwd -o \"StrictHostKeyChecking no\" ". 244 242 "$opts{'peer'} &"); #or die "Failed to run ssh"; 245 243 } … … 279 277 "-o \"StrictHostKeyChecking no\" " . 280 278 "$opts{'peer'} \"$remote_script_dir/fed-tun.pl " . 281 " $remote_config_file-r $addr $count\" & |";279 "-r $addr $count\" & |"; 282 280 283 281 print "$cmd\n" if $debug; … … 415 413 close(TMCD); 416 414 417 die "Unable to determine tunnel node configuration information"418 if (!defined($tunnel_router) || !$tunnel_router);419 420 415 print "tunnel options: ip=$tunnel_ip mask=$tunnel_mask mac=$tunnel_mac router=$tunnel_router\n" if ($debug); 421 416 … … 433 428 warn "configuration of tunnel interface failed" if ($?); 434 429 435 # Sometimes the insertion of DNS names lags a bit. Retry this 436 # configuration a few times to let DNS catch up. Might want to really 437 # check the DNS name before we try this... 438 my $config_succeeded = 0; 439 my $tries = 0; 440 my $max_retries = 300; 441 442 do { 443 system("route add $opts{'peer'} $tunnel_router"); 444 if ( $? ) { 445 warn "configuration routes via tunnel interface failed"; 446 $tries++; 447 sleep(10); 448 } 449 else { $config_succeeded = 1; } 450 } until ( $config_succeeded || $tries > $max_retries ); 430 if ($tunnel_router) { 431 432 # Sometimes the insertion of DNS names lags a bit. Retry this 433 # configuration a few times to let DNS catch up. Might want to really 434 # check the DNS name before we try this... 435 my $config_succeeded = 0; 436 my $tries = 0; 437 my $max_retries = 300; 438 439 do { 440 system("route add $opts{'peer'} $tunnel_router"); 441 if ( $? ) { 442 warn "configuration routes via tunnel interface failed"; 443 $tries++; 444 sleep(10); 445 } 446 else { $config_succeeded = 1; } 447 } until ( $config_succeeded || $tries > $max_retries ); 448 } 451 449 452 450 print "setup_tunnel_cfg done\n" if ($debug);
Note: See TracChangeset
for help on using the changeset viewer.