Merge "Fix check for ISO file in deployment script."

This commit is contained in:
Zuul 2019-01-09 21:33:49 +00:00 committed by Gerrit Code Review
commit 71f1ddef54
1 changed files with 2 additions and 3 deletions

View File

@ -10,9 +10,8 @@ usage() {
iso_image_check() {
local ISOIMAGE=$1
FILETYPE=$(file --mime-type -b ${ISOIMAGE})
if ([ "$FILETYPE" != "application/x-iso9660-image" ]); then
echo "$ISOIMAGE is not an application/x-iso9660-image type"
if ! file ${ISOIMAGE} | grep "DOS/MBR" > /dev/null; then
echo "$ISOIMAGE is not an ISO type"
exit -1
fi
}