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
dd187700
Commit
dd187700
authored
Mar 22, 2010
by
Leigh B Stoller
Browse files
Add -q (quiet) and -n (no reboot) options, for use when extending an
elabinelab.
parent
80aedd58
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/newnode.in
View file @
dd187700
...
...
@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003-200
8
University of Utah and the Flux Group.
# Copyright (c) 2003-20
1
0 University of Utah and the Flux Group.
# All rights reserved.
#
...
...
@@ -85,15 +85,22 @@ if (!TBAdmin()) {
sub
usage
()
{
die
"
Usage: $0 [-f] <node_id> ...
\n
";
}
my
$noreboot
=
0
;
my
$quiet
=
0
;
my
$force_unconnected_interfaces
=
0
;
my
%options
=
();
if
(
!
getopts
("
f
",
\
%options
))
{
if
(
!
getopts
("
f
nq
",
\
%options
))
{
usage
();
}
if
(
$options
{
f
})
{
$force_unconnected_interfaces
=
1
;
}
if
(
$options
{'
n
'})
{
$noreboot
=
1
;
}
if
(
$options
{'
q
'})
{
$quiet
=
1
;
}
#
# We seem to have to do this so that ssh gets proper root permissions to read
...
...
@@ -561,16 +568,19 @@ if ($exports_rv) {
#
# Start rebooting nodes
#
print
"
Rebooting nodes...
\n
";
foreach
my
$IP
(
@reboot_IPs
)
{
print
"
Rebooting
$IP
\n
";
system
"
$newnode_reboot
$IP
\n
";
if
(
!
$noreboot
)
{
print
"
Rebooting nodes...
\n
";
foreach
my
$IP
(
@reboot_IPs
)
{
print
"
Rebooting
$IP
\n
";
system
"
$newnode_reboot
$IP
\n
";
}
}
if
(
!
$quiet
)
{
print
"
\n\n
";
print
"
Finished - when you are satisifed that the nodes are working
\n
";
print
"
correctly, use nfree on boss to free them from the emulab-ops/hwdown
\n
";
print
"
experiment.
\n
";
}
print
"
\n\n
";
print
"
Finished - when you are satisifed that the nodes are working
\n
";
print
"
correctly, use nfree on boss to free them from the emulab-ops/hwdown
\n
";
print
"
experiment.
\n
";
#
# TODO -
...
...
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