Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IOU
microdep
Commits
c0fb5d4a
Commit
c0fb5d4a
authored
Jan 12, 2022
by
Olav Kvittem
Browse files
looking for max_hop in mp-names.list
parent
f2f7de81
Pipeline
#50351
passed with stages
in 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bin/rude-config-maker
View file @
c0fb5d4a
...
...
@@ -21,11 +21,12 @@ die $usage if !$index;
open
LIST
,
"
<
$list
"
||
die
"
Could not open
$list
: $!
\n
";
while
(
<
LIST
>
){
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
;
$dns
{
$name
}
=
$dns
;
$port
{
$name
}
=
$port
;
$crude_port
{
$name
}
=
$crude_port
if
$crude_port
;
$max_hop
{
$name
}
=
$max_hop
||
$max_hops_default
;
}
if
(
$target
&&
!
$port
{
$target
}
){
$port
{
$target
}
=
$default_port
;
...
...
@@ -112,7 +113,7 @@ foreach $name ( keys %port){
printf
$start
"
index=%s
\n
",
$index
;
my
$crude_port
=
$crude_port
{
$name
}
||
$port
{
$name
}
||
$default_port
;
printf
$start
"
crude_port=%s
\n
",
$crude_port
;
printf
$start
"
max_hops=%s
\n
",
$max_hop
s
;
printf
$start
"
max_hops=%s
\n
",
$max_hop
{
$name
}
;
# printf $start "%s", $startcfg;
close
$start
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment