summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-05-03 17:47:42 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-05-03 17:47:42 -0500
commit01eb4e6cb072c1ea7e3cd9630b01d76e557e7728 (patch)
tree46aeb397ea00cd152f8e65a481c2382aaf107ed1
parent23ab69f14a6516958574ab08a00e97bbde2b9d21 (diff)
downloadvyatta-op-01eb4e6cb072c1ea7e3cd9630b01d76e557e7728.tar.gz
vyatta-op-01eb4e6cb072c1ea7e3cd9630b01d76e557e7728.zip
Fail on invalid image name
-rwxr-xr-xscripts/vyatta-image-tools.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl
index fc8bfc8..e2dbba6 100755
--- a/scripts/vyatta-image-tools.pl
+++ b/scripts/vyatta-image-tools.pl
@@ -59,6 +59,10 @@ sub conv_file {
$file = $filein;
$topdir = 'url';
} else {
+ if (! -d "/live/image/boot/$topdir/live-rw"){
+ print "Image $topdir not found!\n";
+ exit 1;
+ }
$file = "/live/image/boot/$topdir/live-rw/$file";
}
return ($topdir, $file);