- Timestamp:
- May 25, 2010 5:41:26 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- d38ff56
- Parents:
- 85462fb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedkit/port_forward.pl
r85462fb r479a7d9 44 44 exit(20) if $?; 45 45 46 # Remove dupes from ports 47 my %mark; 48 @ports = grep($mark{$_}++, @ports); 49 46 50 foreach my $p (@ports) { 47 51 my ($type, $port, $host, $eport) = split(":", $p); 48 52 $eport = $port unless $eport; 53 if ($type ne "local") { 54 # We will need to resolve this host name. Make sure we can. 55 if (!gateway_lib::get_ip($host)) { 56 # the short form isn't resovable. Try the full domain that the 57 # portal is in. If that doesn't work assume the user knows better 58 # and leave $host untouched. 59 chomp (my $hn = `hostname`); 60 (my $try = $hn) =~ s/^[^\.]+/$host/; 61 62 $host = $try if gateway_lib::get_ip($try); 63 } 64 } 49 65 my $fopt = ($type eq 'local' ? "-L" : "-R") . " :$port:$host:$eport"; 50 66 my $cmd = "$ssh -N $fopt -p $ssh_port -o \"StrictHostKeyChecking no\" " .
Note: See TracChangeset
for help on using the changeset viewer.