Changeset 55779d4 for fedkit/active_config.pl
- Timestamp:
- Feb 22, 2010 4:40:21 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 2b11a1d
- Parents:
- 238db1e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedkit/active_config.pl
r238db1e r55779d4 42 42 exit(20) if $?; 43 43 44 my $f = new IO::File($iface_file) || die "Can't open $iface_file: $!\n";45 my $ifnum = 0;46 44 47 45 print "Waiting for ssh on $peer\n"; … … 52 50 "-i $ssh_privkey $peer ls", 5*60); 53 51 54 while (<$f>) { 55 /([[:alnum:]]+)\s+([\d\.]+)/ && do { 56 my ($iface, $addr) = ($1, $2); 52 if (my $f = new IO::File($iface_file)) { 53 my $ifnum = 0; 54 while (<$f>) { 55 /([[:alnum:]]+)\s+([\d\.]+)/ && do { 56 my ($iface, $addr) = ($1, $2); 57 57 58 my $cmd = "$ssh -w $ifnum:$ifnum -o \"Tunnel ethernet\" " . 59 "-o \"StrictHostKeyChecking no\" -i $ssh_privkey " . 60 "$peer perl -I$fedkit_dir/lib $fedkit_dir/bin/setup_bridge.pl " . 61 "--tapno=$ifnum --dest=$addr &"; 62 system($cmd); 63 die if $?; 64 gateway_lib::bind_tap_to_iface($ifnum, $iface, $addr); 65 $ifnum++; 66 }; 58 my $cmd = "$ssh -w $ifnum:$ifnum -o \"Tunnel ethernet\" " . 59 "-o \"StrictHostKeyChecking no\" -i $ssh_privkey " . 60 "$peer perl -I$fedkit_dir/lib $fedkit_dir/bin/setup_bridge.pl " . 61 "--tapno=$ifnum --dest=$addr &"; 62 system($cmd); 63 die if $?; 64 gateway_lib::bind_tap_to_iface($ifnum, $iface, $addr); 65 $ifnum++; 66 }; 67 } 68 $f->close(); 67 69 } 68 $f->close(); 70 else { 71 warn "Can't open $iface_file: $!\n"; 72 } 69 73 exit(0); 70 74
Note: See TracChangeset
for help on using the changeset viewer.