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

Add checks for imagepath before invoking frisbeelauncher. Avoids

obscure errors since we allow the path to be set to null. Setting the
path to null via the web page is probably not a good idea, but I just
did that by accident and noticed what happened ...
parent e683633b
......@@ -275,6 +275,18 @@ foreach my $node (@nodes) {
my $defosid = $imageid_row{'default_osid'};
my $shared = $imageid_row{'shared'};
# Check for a few errors early!
if (!defined($imagepath)) {
die("*** $0:\n".
" There is no filename associated with $imageid!\n");
if (! -R $imagepath) {
die("*** $0:\n".
" $imagepath does not exists or cannot be read!\n");
# 0 means load the entire disk.
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