Commit 51d7b444 authored by Leigh Stoller's avatar Leigh Stoller

Fix quoting in program object command line.

parent 5bd951e6
......@@ -318,12 +318,11 @@ sub GenerateNodeStatements($)
else {
$directory = "None";
}
if ($command !~ /^\'.*\'$/ && $command !~ /^\".*\"$/) {
$command = "'$command'";
}
$command =~ s/\\/\\\\/g;
$command =~ s/\'/\\'/g;
$node->addTagStatement(
"addService(emulab.ProgramAgent('$vname', ".
"$command, $directory, $onexpstart))");
"'$command', $directory, $onexpstart))");
last SWITCH;
};
}
......
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