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
317c82a5
Commit
317c82a5
authored
Sep 14, 2005
by
Mike Hibler
Browse files
Make failure of script-proxy result in a more obvious message.
Pass through some args.
parent
d897bf20
Changes
1
Hide whitespace changes
Inline
Side-by-side
tip/console.in
View file @
317c82a5
...
...
@@ -14,10 +14,11 @@ use POSIX qw(setsid);
#
sub
usage
()
{
print
(
STDOUT
"
Usage: console pcXXX
\n
");
print
(
STDOUT
"
Usage: console
-d
pcXXX
\n
");
exit
(
-
1
);
}
my
$optlist
=
"";
my
@opts
=
();
#
# Configure variables
...
...
@@ -45,6 +46,16 @@ $| = 1;
if
(
!
getopts
(
$optlist
,
\
%options
))
{
usage
();
}
# pass through select options
if
(
defined
(
$options
{"
d
"}))
{
push
@opts
,
"
-d
";
}
if
(
defined
(
$options
{"
p
"}))
{
push
@opts
,
"
-p
";
push
@opts
,
$options
{"
p
"};
}
usage
()
if
(
@ARGV
!=
1
);
my
$node
=
$ARGV
[
0
];
...
...
@@ -87,7 +98,7 @@ if (!$syspid) {
unlink
(
$tempfile
);
exit
(
0
);
}
my
@cmdargs
=
(
$CONSOLEBIN
,
"
-a
",
"
$tempfile
",
"
$node
");
my
@cmdargs
=
(
$CONSOLEBIN
,
"
-a
",
"
$tempfile
",
@opts
,
"
$node
");
exec
(
@cmdargs
);
die
("
*** $0:
\n
"
.
"
Exec failure: '
@cmdargs
'
\n
");
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