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
bfd0bd53
Commit
bfd0bd53
authored
Aug 29, 2001
by
Robert Ricci
Browse files
Now resets pxe_boot_path in the nodes table, from the column of the
same name in the node_types table
parent
f3b6f662
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/nfree.in
View file @
bfd0bd53
...
...
@@ -143,11 +143,13 @@ foreach my $n (@node_names) {
# Find the control net interface for this node type
$sth
=
$dbh
->
query
("
select control_net,osid from node_types left join
"
.
"
nodes on nodes.type=node_types.type where node_id='
$n
'
");
$dbh
->
query
("
select control_net,osid,node_types.pxe_boot_path
"
.
"
from node_types left join nodes on nodes.type=node_types.type
"
.
"
where node_id='
$n
'
");
my
@row
=
$sth
->
fetchrow_array
();
my
$control
=
$row
[
0
];
my
$osid
=
$row
[
1
];
my
$pxe_boot_path
=
$row
[
2
];
if
(
!
(
$n
=~
/sh\d+/
))
{
#If its not a shark
# Clean out all IPs except the control net
$cmd
=
...
...
@@ -172,8 +174,8 @@ foreach my $n (@node_names) {
# And clean out various tidbits from the nodes table.
$cmd
=
"
update nodes set def_boot_osid='
$osid
', def_boot_cmd_line='',
"
.
"
def_boot_path='',startupcmd='',rpms='',deltas='',tarballs=''
"
.
"
where node_id='
$n
'
";
"
def_boot_path='',startupcmd='',rpms='',deltas='',tarballs=''
,
"
.
"
pxe_boot_path='
$pxe_boot_path
'
where node_id='
$n
'
";
$sth
=
$dbh
->
query
(
$cmd
)
||
(
print
"
Failed Command:
\n
$cmd
\n
Error string is:
"
.
$dbh
->
errstr
.
"
\n
"
&&
$error
++
);
...
...
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