Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Elijah Grubb
emulab-devel
Commits
317c82a5
Commit
317c82a5
authored
Sep 14, 2005
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make failure of script-proxy result in a more obvious message.
Pass through some args.
parent
d897bf20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
tip/console.in
tip/console.in
+13
-2
No files found.
tip/console.in
View file @
317c82a5
...
@@ -14,10 +14,11 @@ use POSIX qw(setsid);
...
@@ -14,10 +14,11 @@ use POSIX qw(setsid);
#
#
sub
usage
()
sub
usage
()
{
{
print
(
STDOUT
"
Usage: console pcXXX
\n
");
print
(
STDOUT
"
Usage: console
-d
pcXXX
\n
");
exit
(
-
1
);
exit
(
-
1
);
}
}
my
$optlist
=
"";
my
$optlist
=
"";
my
@opts
=
();
#
#
# Configure variables
# Configure variables
...
@@ -45,6 +46,16 @@ $| = 1;
...
@@ -45,6 +46,16 @@ $| = 1;
if
(
!
getopts
(
$optlist
,
\
%options
))
{
if
(
!
getopts
(
$optlist
,
\
%options
))
{
usage
();
usage
();
}
}
# pass through select options
if
(
defined
(
$options
{"
d
"}))
{
push
@opts
,
"
-d
";
}
if
(
defined
(
$options
{"
p
"}))
{
push
@opts
,
"
-p
";
push
@opts
,
$options
{"
p
"};
}
usage
()
usage
()
if
(
@ARGV
!=
1
);
if
(
@ARGV
!=
1
);
my
$node
=
$ARGV
[
0
];
my
$node
=
$ARGV
[
0
];
...
@@ -87,7 +98,7 @@ if (!$syspid) {
...
@@ -87,7 +98,7 @@ if (!$syspid) {
unlink
(
$tempfile
);
unlink
(
$tempfile
);
exit
(
0
);
exit
(
0
);
}
}
my
@cmdargs
=
(
$CONSOLEBIN
,
"
-a
",
"
$tempfile
",
"
$node
");
my
@cmdargs
=
(
$CONSOLEBIN
,
"
-a
",
"
$tempfile
",
@opts
,
"
$node
");
exec
(
@cmdargs
);
exec
(
@cmdargs
);
die
("
*** $0:
\n
"
.
die
("
*** $0:
\n
"
.
"
Exec failure: '
@cmdargs
'
\n
");
"
Exec failure: '
@cmdargs
'
\n
");
Write
Preview
Markdown
is supported
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