From 822c1ca687fbc1af75de3b6c8651896a71c9f638 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 5 Nov 2007 11:26:40 +0100 Subject: [PATCH] Update log check inside grml-live --- grml-live | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/grml-live b/grml-live index ab6b3c8..1becf15 100755 --- a/grml-live +++ b/grml-live @@ -341,23 +341,28 @@ else # notice: 'fai dirinstall' does not seem to exit appropriate, so: ERROR='' - if [ -r "/var/log/fai/dirinstall/$HOSTNAME/software.log" ] ; then + if [ -n "$UPDATE" ] ; then + CHECKLOG=/var/log/fai/current/ + else + CHECKLOG=/var/log/fai/dirinstall/$HOSTNAME/ + fi + if [ -r "$CHECKLOG/software.log" ] ; then # 1 errors during executing of commands # Unable to write mmap - msync (28 No space left on device) # 'No candidate version found for' [/var/log/fai/current/software.log] - grep 'dpkg: error processing' /var/log/fai/dirinstall/$HOSTNAME/software.log >> $LOGFILE && ERROR=1 - grep 'E: Method http has died unexpectedly!' /var/log/fai/dirinstall/$HOSTNAME/software.log >> $LOGFILE && ERROR=2 - grep 'ERROR: chroot' /var/log/fai/dirinstall/$HOSTNAME/software.log >> $LOGFILE && ERROR=3 + grep 'dpkg: error processing' $CHECKLOG/software.log >> $LOGFILE && ERROR=1 + grep 'E: Method http has died unexpectedly!' $CHECKLOG/software.log >> $LOGFILE && ERROR=2 + grep 'ERROR: chroot' $CHECKLOG/software.log >> $LOGFILE && ERROR=3 fi - if [ -r "/var/log/fai/dirinstall/$HOSTNAME/shell.log" ] ; then - grep 'FAILED with exit code' /var/log/fai/dirinstall/$HOSTNAME/shell.log >> $LOGFILE && ERROR=2 + if [ -r "$CHECKLOG/shell.log" ] ; then + grep 'FAILED with exit code' $CHECKLOG/shell.log >> $LOGFILE && ERROR=2 fi if [ -n "$ERROR" ] ; then log "There was an error [${ERROR}] during execution of stage 'fai dirinstall' [$(date)]" eerror "There was an error during execution of stage 'fai dirinstall'" - echo " Check out /var/log/fai/dirinstall/$HOSTNAME/ for details. [exit ${ERROR}]" + echo " Check out $CHECKLOG for details. [exit ${ERROR}]" eend 1 bailout 1 else -- 2.1.4