Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
97c1baf3
Commit
97c1baf3
authored
Jan 19, 2001
by
Mac Newbold
Browse files
Fixed a blank line problem in the links section, fixed the regular expression for lans.
parent
1c67ae1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/ns2ir/postparse.in
View file @
97c1baf3
...
...
@@ -196,7 +196,9 @@ foreach (@links) {
push
(
@newlinks
,"
$_
0.0
");
}
}
&ir_set
("
/topology/links
",
join
("
\n
",
@newlinks
)
.
"
\n
");
if
(
$#newlinks
!=
-
1
)
{
&ir_set
("
/topology/links
",
join
("
\n
",
@newlinks
)
.
"
\n
");
}
# Set lan loss
$raw
=
eval
{
&ir_get
("
/topology/lans
")};
...
...
@@ -207,7 +209,8 @@ if ($@) {
@lans
=
split
("
\n
",
$raw
);
@newlans
=
();
foreach
(
@lans
)
{
(
$lan
,
$prefix
,
$postfix
)
=
/^([^ ]+) ("[^\"]+" [^ ]+ [^ ]+)[ \t]+(.*)$/
;
(
$lan
,
$prefix
,
$postfix
)
=
/^([^ ]+) (\"[^\"]+\" [^ ]+ [^ ]+)(?:[ \t]+(.*))?$/
;
if
(
defined
(
$lanloss
{
$lan
}))
{
$loss
=
$lanloss
{
$lan
}
}
else
{
...
...
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