Commit 33417028 authored by Mike Hibler's avatar Mike Hibler
Browse files

more fixes

parent f6a1d906
...@@ -50,13 +50,21 @@ if (defined($options{"S"})) { ...@@ -50,13 +50,21 @@ if (defined($options{"S"})) {
$stub_cmdargs = $options{"S"}; $stub_cmdargs = $options{"S"};
} }
if (defined($options{"s"})) { if (defined($options{"s"})) {
$stub_cmdargs .= " " . $options{"s"}; if ($stub_cmdargs eq $UNKNOWN) {
$stub_cmdargs = $options{"s"};
} else {
$stub_cmdargs .= " " . $options{"s"};
}
} }
if (defined($options{"M"})) { if (defined($options{"M"})) {
$mon_cmdargs = $options{"M"}; $mon_cmdargs = $options{"M"};
} }
if (defined($options{"m"})) { if (defined($options{"m"})) {
$mon_cmdargs .= " " . $options{"m"}; if ($mon_cmdargs eq $UNKNOWN) {
$mon_cmdargs = $options{"m"};
} else {
$mon_cmdargs .= " " . $options{"m"};
}
} }
if (defined($options{"C"})) { if (defined($options{"C"})) {
my $cmdline = $stub_cmd . " " . my $cmdline = $stub_cmd . " " .
...@@ -69,7 +77,11 @@ if (defined($options{"C"})) { ...@@ -69,7 +77,11 @@ if (defined($options{"C"})) {
} }
if (defined($options{"p"})) { if (defined($options{"p"})) {
$realplab = 1; $realplab = 1;
$mon_cmdargs .= " " . "-p"; if ($mon_cmdargs eq $UNKNOWN) {
$mon_cmdargs = "-p";
} else {
$mon_cmdargs .= " " . "-p";
}
} }
# #
...@@ -153,7 +165,7 @@ if (system "$TEVC -e $pid/$eid now planetc-tracemon start") { ...@@ -153,7 +165,7 @@ if (system "$TEVC -e $pid/$eid now planetc-tracemon start") {
# #
my $startarg = ""; my $startarg = "";
print "##### Starting stubs"; print "##### Starting stubs";
if ($stub_cmdargs ne $UNKNOWN && $stub_cmdargs !~ /^\s*$/) { if ($stub_cmdargs ne $UNKNOWN) {
print " with: '$stub_cmd $stub_cmdargs'"; print " with: '$stub_cmd $stub_cmdargs'";
$startarg = "'COMMAND={$stub_cmd $stub_cmdargs}'"; $startarg = "'COMMAND={$stub_cmd $stub_cmdargs}'";
} }
...@@ -203,8 +215,10 @@ sub get_cmdargs($$) ...@@ -203,8 +215,10 @@ sub get_cmdargs($$)
my @info = `unzip -p $file "${ntype}-1/local/logs/${lfile}-1.status"`; my @info = `unzip -p $file "${ntype}-1/local/logs/${lfile}-1.status"`;
foreach (@info) { foreach (@info) {
if (/^COMMAND=(.*)/) { if (/^COMMAND=(.*)/) {
$cmdargs = $1; if ($1 ne $cmd) {
$cmdargs =~ s/$cmd(.*)/$1/; $cmdargs = $1;
$cmdargs =~ s/$cmd(.*)/$1/;
}
last; last;
} }
} }
......
Supports Markdown
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