Support FAI's newer scripts.log, as used with FAI versions >=6.0
authorMichael Prokop <mika@grml.org>
Thu, 7 Sep 2023 14:58:46 +0000 (16:58 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 7 Sep 2023 14:58:46 +0000 (16:58 +0200)
Older FAI versions used to log the output of the scripts to shell.log,
now as of FAI versions >=6.0 they end up in scripts.log instead, so
also check those to identify failures during builds.

grml-live

index 1bb84b6..fa478b8 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -796,10 +796,16 @@ else
          grep 'Unable to write mmap - msync (28 No space left on device)' $CHECKLOG/software.log >> $LOGFILE && ERROR=5
       fi
 
+      # FAI versions <6.0 used to write to shell.log
       if [ -r "$CHECKLOG/shell.log" ] ; then
          grep 'FAILED with exit code' $CHECKLOG/shell.log >> $LOGFILE && ERROR=6
       fi
 
+      # FAI versions >=6.0 always writes to scripts.log
+      if [ -r "$CHECKLOG/scripts.log" ] ; then
+         grep 'FAILED with exit code' $CHECKLOG/shell.log >> $LOGFILE && ERROR=6
+      fi
+
       if [ -r "$CHECKLOG/fai.log" ] ; then
         grep 'updatebase.*FAILED with exit code' "$CHECKLOG/fai.log" >> "$LOGFILE" && ERROR=7
         grep 'instsoft.*FAILED with exit code'   "$CHECKLOG/fai.log" >> "$LOGFILE" && ERROR=8