summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/g-i-installation.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh
index 9e542482..0660faf4 100755
--- a/bin/g-i-installation.sh
+++ b/bin/g-i-installation.sh
@@ -279,11 +279,19 @@ monitor_system() {
PRINTF_OLD=$(printf "%06d" $OLD)
set -x
if diff -q snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm ; then
- LAST_LINE=$(gocr snapshot_${PRINTF_NR}.ppm|tail -1|cut -d "]" -f2- || true)
+ GOCR=$(mktemp)
+ gocr snapshot_${PRINTF_NR}.ppm > $GOCR
+ LAST_LINE=$(tail -1 $GOCR |cut -d "]" -f2- || true)
+ STACK_LINE=$(egrep "(Call Trace|end trace)" $GOCR || true)
+ rm $GOCR
if [ "$LAST_LINE" = " Power down." ] ; then
echo "QEMU was powered down, continuing."
backup_screenshot
break
+ elif [ ! -z $STACK_LINE ] ; then
+ echo "WARNING: got a stack-trace, probably on power-down."
+ backup_screenshot
+ break
elif [ ! -z $TRIGGERED ] ; then
echo ERROR snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm match, ending installation.
ls -la snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm