From 01eb4e6cb072c1ea7e3cd9630b01d76e557e7728 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 3 May 2011 17:47:42 -0500 Subject: Fail on invalid image name --- scripts/vyatta-image-tools.pl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') 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); -- cgit v1.2.3