Commit c0fb5d4a authored by Olav Kvittem's avatar Olav Kvittem
Browse files

looking for max_hop in mp-names.list

parent f2f7de81
Pipeline #50351 passed with stages
in 56 seconds
...@@ -21,11 +21,12 @@ die $usage if !$index; ...@@ -21,11 +21,12 @@ die $usage if !$index;
open LIST, "<$list" || die "Could not open $list : $!\n"; open LIST, "<$list" || die "Could not open $list : $!\n";
while(<LIST>){ while(<LIST>){
next if /\s*#/; # comment next if /\s*#/; # comment
($name, $uid, $dns, $ip, $port, $crude_port)=split; ($name, $uid, $dns, $ip, $port, $crude_port, $ssh_port, $max_hop)=split;
$ip{$name}=$ip; $ip{$name}=$ip;
$dns{$name}=$dns; $dns{$name}=$dns;
$port{$name}=$port; $port{$name}=$port;
$crude_port{$name}=$crude_port if $crude_port; $crude_port{$name}=$crude_port if $crude_port;
$max_hop{$name}= $max_hop || $max_hops_default;
} }
if ($target && ! $port{$target} ){ if ($target && ! $port{$target} ){
$port{$target} = $default_port; $port{$target} = $default_port;
...@@ -112,7 +113,7 @@ foreach $name ( keys %port){ ...@@ -112,7 +113,7 @@ foreach $name ( keys %port){
printf $start "index=%s\n", $index ; printf $start "index=%s\n", $index ;
my $crude_port= $crude_port{$name} || $port{$name} || $default_port; my $crude_port= $crude_port{$name} || $port{$name} || $default_port;
printf $start "crude_port=%s\n", $crude_port; printf $start "crude_port=%s\n", $crude_port;
printf $start "max_hops=%s\n", $max_hops; printf $start "max_hops=%s\n", $max_hop{$name};
# printf $start "%s", $startcfg; # printf $start "%s", $startcfg;
close $start; close $start;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment