From 4ce3e01cfc6211c60f0a1c1af49172290cfa77c5 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 3 Jan 2015 18:28:00 +0100 Subject: g-i: take regular screenshots during installation and another if installation is hanging --- bin/g-i-installation.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index 6ccd5b22..f878a51e 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -1097,6 +1097,10 @@ monitor_system() { echo "$(date) $PRINTF_NR / $TOKEN" publish_screenshot fi + # in install mode, every 300 ticks preserve an screenshot as artefact + if [ "$MODE" = "install" ] && [ $(($NR % 300)) -eq 0 ] ; then + backup_screenshot + fi # every 100 screenshots, starting from the $TIMEOUTth one... if [ $(($NR % 100)) -eq 0 ] && [ $NR -gt $TIMEOUT ] ; then # from help let: "Exit Status: If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." @@ -1134,6 +1138,7 @@ monitor_system() { echo "System in $MODE mode is hanging." if [ "$MODE" = "install" ] ; then # hanging install = broken install + backup_screenshot exit 1 fi break -- cgit v1.2.3-70-g09d2