Commit 9f10a704 authored by Leigh Stoller's avatar Leigh Stoller

Add check for valid imageid. Sucks when you mess this up and it gets

stuck in the reload table!.
parent 4c11aa5d
......@@ -116,7 +116,17 @@ foreach my $node ( @ARGV ) {
# Mere users cannot schedule reloads.
#
if ($UID && !TBAdmin($UID)) {
die("Only root or TB administrators can schedule disk reloads.\n");
die("*** Only root or TB administrators can schedule disk reloads.\n");
}
#
# Confirm a valid imageid!
#
my $query_result =
DBQueryFatal("select * from images where imageid='$imageid'");
if ($query_result->numrows < 1) {
die("*** No such imageid $imageid is registered in the DB!");
}
#
......
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