Commit 7481da21 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Check earlier that the nsfile exists, is a file, and is readable.

Exit with positive value so that web interface reports error to
the user, not to us!
parent 5c113c2f
......@@ -146,6 +146,12 @@ if (!defined($tempnsfile)) {
$swappable = 0;
$idleswap = 0;
}
elsif (! -f $tempnsfile || ! -r $tempnsfile) {
# Exit so that user sees the error, not us.
print STDERR "*** $0:\n".
" $tempnsfile does not exist or is not a readable file!\n";
exit(1);
}
#
# Batch jobs get a shorter idle time
......
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