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
140b78a5
Commit
140b78a5
authored
Dec 27, 2000
by
mac
Browse files
Fixed shark control_net lookup.
parent
87f6b79d
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/nfree
View file @
140b78a5
...
...
@@ -91,18 +91,21 @@ foreach my $n (@node_names) {
||
(
print
"
Failed Command:
\n
$cmd
\n
Error string is:
"
.
$dbh
->
errstr
.
"
\n
"
&&
$error
++
);
}
# Find the control net interface for this node type
$sth
=
$dbh
->
query
("
select control_net from node_types as t left join
"
.
"
nodes as n on n.type=t.type where node_id='
$n
'
");
my
@row
=
$sth
->
fetchrow_array
();
my
$control
=
$row
[
0
];
# Clean out all IPs except the control net
$cmd
=
"
update interfaces set IP='' where node_id='
$n
' and card!='
$control
'
";
$sth
=
$dbh
->
query
(
$cmd
)
||
(
print
"
Failed Command:
\n
$cmd
\n
Error string is:
"
.
$dbh
->
errstr
.
"
\n
"
&&
$error
++
);
if
(
!
(
$n
=~
/^tbsh/
))
{
#If its not a shark
# Find the control net interface for this node type
$sth
=
$dbh
->
query
("
select control_net from node_types as t left join
"
.
"
nodes as n on n.type=t.type where node_id='
$n
'
");
my
@row
=
$sth
->
fetchrow_array
();
my
$control
=
$row
[
0
];
# Clean out all IPs except the control net
$cmd
=
"
update interfaces set IP='' where node_id='
$n
' and card!='
$control
'
";
$sth
=
$dbh
->
query
(
$cmd
)
||
(
print
"
Failed Command:
\n
$cmd
\n
Error string is:
"
.
$dbh
->
errstr
.
"
\n
"
&&
$error
++
);
}
}
foreach
$reload
(
keys
(
%reloads
))
{
...
...
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