diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-05-03 17:47:42 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-05-03 17:47:42 -0500 |
commit | 01eb4e6cb072c1ea7e3cd9630b01d76e557e7728 (patch) | |
tree | 46aeb397ea00cd152f8e65a481c2382aaf107ed1 /scripts | |
parent | 23ab69f14a6516958574ab08a00e97bbde2b9d21 (diff) | |
download | vyatta-op-01eb4e6cb072c1ea7e3cd9630b01d76e557e7728.tar.gz vyatta-op-01eb4e6cb072c1ea7e3cd9630b01d76e557e7728.zip |
Fail on invalid image name
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-image-tools.pl | 4 |
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); |