Changeset 8d4e4fb for fedkit/combo.pl
- Timestamp:
- Feb 10, 2010 10:29:18 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- bbd0039
- Parents:
- b73cc45
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
fedkit/combo.pl
rb73cc45 r8d4e4fb 11 11 my $ssh_pubkey; 12 12 my $ssh_privkey; 13 my $active; 13 14 my $tunnelip; 14 15 my $peer; 15 16 my $fedkit_dir= "/usr/local/federation"; 16 17 my $perl = "/usr/bin/perl"; 17 my $iface_file ;18 my $iface_file = "/var/emulab/boot/ifmap"; 18 19 my $ssh = "/usr/bin/ssh"; 19 20 my @ports; 21 my $use_file; 20 22 21 exit(20) unless GetOptions(23 my %opts = ( 22 24 'ssh_pubkey=s' => \$ssh_pubkey, 23 25 'ssh_privkey=s' => \$ssh_privkey, … … 28 30 'interfaces=s' => \$iface_file, 29 31 'ssh=s' => \$ssh, 30 'port=s', \@ports, 32 'port=s' => \@ports, 33 'active' => \$active, 34 'use_file' => \$use_file, 31 35 ); 32 36 37 exit(20) unless GetOptions(%opts); 38 39 gateway_lib::read_config(gateway_lib::emulab_config_filename(), \%opts) 40 if $use_file; 33 41 34 42 my $tunnelparam = $tunnelip ? '--tunnelip' : ''; 35 my $portparam = join(" --port=", @ports); 43 if ($active) { 44 my $portparam = join(" --port=", @ports); 36 45 37 # join doesn't prefix the first one38 $portparam="--port=$portparam" if $portparam;46 # join doesn't prefix the first one 47 $portparam="--port=$portparam" if $portparam; 39 48 40 system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/active_config.pl " .41 42 43 44 exit(20) if $?;49 system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/active_config.pl " . 50 "--peer=$peer --ssh_pubkey=$ssh_pubkey --ssh_privkey=$ssh_privkey " . 51 " $tunnelparam --fedkit=$fedkit_dir --perl=$perl " . 52 "--ssh=$ssh --interfaces=$iface_file"); 53 exit(20) if $?; 45 54 46 system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/port_forward.pl " . 47 "--peer=$peer --ssh_pubkey=$ssh_pubkey --ssh_privkey=$ssh_privkey " . 48 " $tunnelparam --fedkit=$fedkit_dir --perl=$perl " . 49 "--ssh=$ssh $portparam"); 50 exit(20) if $?; 55 system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/port_forward.pl " . 56 "--peer=$peer --ssh_pubkey=$ssh_pubkey --ssh_privkey=$ssh_privkey " . 57 " $tunnelparam --fedkit=$fedkit_dir --perl=$perl " . 58 "--ssh=$ssh $portparam"); 59 exit(20) if $?; 60 } 61 else { 62 system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/prep_gateway.pl " . 63 "--peer=$peer --ssh_pubkey=$ssh_pubkey $tunnelparam"); 64 exit(20) if $?; 65 } 51 66 52 67 =pod … … 108 123 connectivity information 109 124 125 =item B<use_file> 126 127 If given read additional parameters from the file in 128 /proj/I<project>/exp/I<experiment/tmp/I<hostname>.gw/conf where those are the 129 current testbed project and experiment and the hostname is before the first 130 dot. The file is option: value. 131 110 132 =back 111 133
Note: See TracChangeset
for help on using the changeset viewer.