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-devel
Commits
c94cbb7c
Commit
c94cbb7c
authored
Dec 11, 2012
by
Leigh B Stoller
Browse files
Bug fixes.
parent
63a70a67
Changes
1
Hide whitespace changes
Inline
Side-by-side
install/genirack/initilo.pl.in
View file @
c94cbb7c
...
@@ -62,6 +62,7 @@ sub Fatal($);
...
@@ -62,6 +62,7 @@ sub Fatal($);
sub
ChangeBootOrder
($);
sub
ChangeBootOrder
($);
sub
SendXML
($$);
sub
SendXML
($$);
sub
SetupControlNode
($$);
sub
SetupControlNode
($$);
sub
DoOutlet
($);
# un-taint path
# un-taint path
$ENV
{'
PATH
'}
=
'
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/site/bin
';
$ENV
{'
PATH
'}
=
'
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/site/bin
';
...
@@ -138,6 +139,12 @@ if ($control) {
...
@@ -138,6 +139,12 @@ if ($control) {
exit
(
SetupControlNode
(
$ARGV
[
0
],
$ARGV
[
1
]));
exit
(
SetupControlNode
(
$ARGV
[
0
],
$ARGV
[
1
]));
}
}
if
(
$dooutlet
)
{
usage
()
if
(
@ARGV
!=
1
);
exit
(
DoOutlet
(
$ARGV
[
0
]));
}
usage
()
usage
()
if
(
@ARGV
!=
2
);
if
(
@ARGV
!=
2
);
...
@@ -155,20 +162,6 @@ if (defined($management_interface)) {
...
@@ -155,20 +162,6 @@ if (defined($management_interface)) {
}
}
my
$iloIP
=
$management_interface
->
IP
();
my
$iloIP
=
$management_interface
->
IP
();
if
(
$dooutlet
)
{
#
# Add the outlet and authinfo.
#
$node
->
AddOutlet
(
$type
,
0
,
{"
key_type
"
=>
"
ilo3
",
"
key_role
"
=>
"
ssh-key
",
"
key_uid
"
=>
"
elabman
",
"
key
"
=>
$DSAKEY
})
==
0
or
Fatal
("
Could not add outlet record
");
exit
(
0
);
}
#
#
# Before we create the interface, make sure we can install our
# Before we create the interface, make sure we can install our
# login/password/key info on the ilo.
# login/password/key info on the ilo.
...
@@ -396,3 +389,24 @@ sub SetupControlNode($$)
...
@@ -396,3 +389,24 @@ sub SetupControlNode($$)
return
0
;
return
0
;
}
}
sub
DoOutlet
($)
{
my
(
$node_id
)
=
@_
;
my
$node
=
Node
->
Lookup
(
$node_id
);
if
(
!
defined
(
$node
))
{
Fatal
("
No such node
");
}
#
# Add the outlet and authinfo.
#
$node
->
AddOutlet
("
ilo3
",
0
,
{"
key_type
"
=>
"
ilo3
",
"
key_role
"
=>
"
ssh-key
",
"
key_uid
"
=>
"
elabman
",
"
key
"
=>
$DSAKEY
})
==
0
or
Fatal
("
Could not add outlet record
");
return
0
;
}
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