diff options
author | Irina Gómez <irinagomez@us.es> | 2019-11-08 14:04:21 +0100 |
---|---|---|
committer | Irina Gómez <irinagomez@us.es> | 2019-11-08 14:04:21 +0100 |
commit | 0531169693dcd2e17bc158af5cf36584629e01ee (patch) | |
tree | c196c90c7dd1aefe7130c4b26b106048f6f338a7 /client/shared/scripts/deployImage | |
parent | 3df93abeaa9a24dcf9576606c515162fdb82b4a5 (diff) |
#914 deployImagen shows error message when image file is corrupt or was created with other partclone version.
Diffstat (limited to 'client/shared/scripts/deployImage')
-rwxr-xr-x | client/shared/scripts/deployImage | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/shared/scripts/deployImage b/client/shared/scripts/deployImage index 9406d80e..d74d3ac2 100755 --- a/client/shared/scripts/deployImage +++ b/client/shared/scripts/deployImage @@ -98,7 +98,12 @@ fi #Informacioin previa de la imagen IMGOS=$(ogGetImageInfo `ogGetPath $MODE $IMGNAME.img`) -[ -n "$IMGOS" ] || exit $(ogRaiseError session $OG_ERR_NOTFOUND "$REPO $2"; echo $?) +case $? in + 0) ;; + 1) ogRaiseError session $OG_ERR_NOTFOUND "$REPO $2" || exit $? ;; + 5) ogRaiseError session $OG_ERR_IMAGEFILE "$REPO $2" || exit $? ;; + *) ogRaiseError session $OG_ERR_GENERIC || exit $? ;; +esac IMGSIZE=$(ls -s `ogGetPath $MODE $IMGNAME.img`| cut -f1 -d" ") ogEcho log session "[1] REPO=$REPO IMG-FILE=$IMGNAME.img SIZE=$IMGSIZE (KB) METADATA=$IMGOS" |