summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGabriele Giacone <1o5g4r8o@gmail.com>2014-03-16 17:57:09 +0100
committerHolger Levsen <holger@layer-acht.org>2014-04-06 18:21:19 +0200
commit5352cd78afab176bf2b5e428579704d105dfb223 (patch)
tree33b3ff6e6e96ba121f8ef3dcab65f58006d1ac6f /bin
parentf9ee71e8e03bbb3231d1485fb31860f4342ed4a0 (diff)
downloadjenkins.debian.net-5352cd78afab176bf2b5e428579704d105dfb223.tar.xz
Support hybrid images.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/g-i-installation.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh
index ced44aff..cd667d8a 100755
--- a/bin/g-i-installation.sh
+++ b/bin/g-i-installation.sh
@@ -231,7 +231,7 @@ boot_system() {
QEMU_OPTS="$QEMU_OPTS -drive file=$NAME.raw,index=0,media=disk,cache=writeback -m $RAMSIZE -net nic,vlan=0 -net user,vlan=0,host=10.0.2.1,dhcpstart=10.0.2.2,dns=10.0.2.254"
echo "Checking $NAME.raw:"
FILE=$(file $NAME.raw)
- if [ $(echo $FILE | grep "x86 boot sector" | wc -l) -eq 0 ] ; then
+ if [ $(echo $FILE | grep -E '(x86 boot sector|DOS/MBR boot sector)' | wc -l) -eq 0 ] ; then
echo "ERROR: no x86 boot sector found in $NAME.raw - it's filetype is $FILE."
exit 1
fi
@@ -949,7 +949,7 @@ trap cleanup_all INT TERM EXIT
if [ ! -z "$IMAGE" ] ; then
fetch_if_newer "$IMAGE" "$URL"
# is this really an .iso?
- if [ $(file "$IMAGE" | grep -c "ISO 9660") -eq 1 ] ; then
+ if [ $(file "$IMAGE" | grep -cE '(ISO 9660|DOS/MBR boot sector)') -eq 1 ] ; then
# yes, so let's mount it
sudo mkdir -p $IMAGE_MNT
grep -q $IMAGE_MNT /proc/mounts && sudo umount -l $IMAGE_MNT