diff options
author | Holger Levsen <holger@layer-acht.org> | 2013-01-08 14:22:24 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2013-01-08 14:22:24 +0100 |
commit | 13a2fffda8d729a5c09272dd6f2bcbf0a8251575 (patch) | |
tree | 84100bdbdf78c9930268ea93fec393cb974b51bf | |
parent | c3e17179b40c2af240c539980aef1be1908f0cdd (diff) | |
download | jenkins.debian.net-13a2fffda8d729a5c09272dd6f2bcbf0a8251575.tar.xz |
g-i: fail if no bootable image was created
-rwxr-xr-x | bin/g-i-installation.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index 837ce0eb..5bbc0dfb 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -191,8 +191,11 @@ boot_system() { QEMU_OPTS="-display vnc=$DISPLAY -no-shutdown" QEMU_OPTS="$QEMU_OPTS -drive file=$NAME.raw,index=0,media=disk,cache=writeback -m $RAMSIZE" echo "Checking $NAME.raw:" - file $NAME.raw - # FIXME: exit here if image is not bootable + FILE=$(file $NAME.raw) + if [ $(echo $FILE | grep "x86 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 case $NAME in debian-edu*_combi-server) QEMU_OPTS="$QEMU_OPTS -net nic -net user -net nic,model=e1000" |