Commit e0aff8cb authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Hacky fix for sharks, but what about the sharks isn't hacky?

parent c93ce461
......@@ -53,18 +53,33 @@ foreach my $node (@nodes) {
if ($node =~ /^([-\@\w.]+)$/) {
$node = $1;
}
else {
die("Tainted node name: $node");
}
#
# Need the project for the node since that is the group.
#
$db_result = $DB->query("select pid from reserved where node_id='$node'");
if ($db_result->numrows == 1) {
#
# HACK! If its a shark shelf, then need a wildcard query so we can
# the nodes.
#
if ($node =~ /sh\d+/) {
$db_result =
$DB->query("select pid from reserved where node_id like '$node%'");
}
else {
$db_result =
$DB->query("select pid from reserved where node_id='$node'");
}
if ($db_result->numrows > 0) {
@row = $db_result->fetchrow_array();
$pid = $row[0];
}
else {
$pid = $TBPID;
}
$cmdargs = "$cmdargs $node $pid";
}
......
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