Fix check for ISO file in deployment script.
The checking for ISO files was made through the mime type. However this method can fail as the mime type can be set differently by the browser or tool used to download the file. An example of this behavior can be found on Fedora 28 where the file command returns application/octect-stream. The fix is to avoid using the mime type for checking and just verify that if a DOS/MBR file. Closes-Bug: 1804610 Change-Id: I69f09df66215d405720801fbcbe3d43aac668564 Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
This commit is contained in:
parent
ded5fc1218
commit
3645b8517f
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue