Commit 317c82a5 authored by Mike Hibler's avatar Mike Hibler

Make failure of script-proxy result in a more obvious message.

Pass through some args.
parent d897bf20
...@@ -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");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment