Skip to content
GitLab
Menu
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-stable
Commits
89a70320
Commit
89a70320
authored
Apr 11, 2001
by
Robert Ricci
Browse files
Can now handle PCs that look like 'tbpc' or 'pc'
parent
2f9b1264
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/ptopgen
View file @
89a70320
...
...
@@ -17,7 +17,7 @@ while (<>) {
if
(
/^\|node_id/
)
{
next
;}
/^\|([a-zA-Z0-9]*).*\|/
;
$node
=
$
1
;
if
(
$node
=~
/^(tbpc|sh)/
)
{
if
(
$node
=~
/^(
(
tb
){0,1}
pc|sh)/
)
{
print
STDERR
"
Got '
$node
'
\t
"
if
$d
&&
!
defined
(
$nodes
{
$node
});
$nodes
{
$node
}
=
1
;
}
...
...
@@ -57,7 +57,7 @@ print "node cisco switch\n";
# Give the nodes:
foreach
$node
(
sort
keys
%nodes
)
{
if
(
$node
=~
/
tb
pc/
)
{
if
(
$node
=~
/pc/
)
{
print
"
node
$node
pc:1 delay:2
\n
";
print
"
link
$node
-0
$node
:
$links
{
$node
.'-0'} cisco 100 1
\n
";
print
"
link
$node
-1
$node
:
$links
{
$node
.'-1'} cisco 100 1
\n
";
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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