X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=4fbed190d207bba94f102943d6c849b55ba1075f;hp=0ad0e754f451ba6fdbf81b78ad0537a416bd059e;hb=c62c80321335cf42ee4c04922c801ad963c1fd5a;hpb=9954603848466fe877026c2b574651eddc03a43d diff --git a/grml-live b/grml-live index 0ad0e75..4fbed19 100755 --- a/grml-live +++ b/grml-live @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Sat Oct 06 18:28:57 CEST 2007 [mika] +# Latest change: Mit Okt 10 09:38:42 CEST 2007 [mika] ################################################################################ # read configuration files, set some misc variables {{{ @@ -174,6 +174,7 @@ while getopts "c:g:i:o:r:s:t:v:FhV" opt; do done shift $(($OPTIND - 1)) # set ARGV to the first not parsed commandline parameter +echo "Executing: $(basename $0) $*" >> $LOGFILE # }}} # some misc checks before executing FAI {{{ @@ -242,9 +243,8 @@ if [ -n "$SUITE" ] ; then sed -i "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" $LIVE_CONF sed -i "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" /etc/grml/fai/apt/sources.list - DIST='\"etch\|=\"stable=\"lenny=\"testing=\"sid=\"unstable' - sed -i "s#FAI_DEBOOTSTRAP=$DIST#FAI_DEBOOTSTRAP=\"$SUITE#" $LIVE_CONF - sed -i "s#FAI_DEBOOTSTRAP=$DIST#FAI_DEBOOTSTRAP=\"$SUITE#" /etc/grml/fai/make-fai-nfsroot.conf + sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" $LIVE_CONF + sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" /etc/grml/fai/make-fai-nfsroot.conf fi # }}} @@ -268,7 +268,10 @@ else # notice: 'fai dirinstall' does not seem to exit appropriate, so: ERROR='' if [ -r "/var/log/fai/dirinstall/$HOSTNAME/software.log" ] ; then + # 1 errors during executing of commands 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 fi if [ -r "/var/log/fai/dirinstall/$HOSTNAME/shell.log" ] ; then @@ -276,10 +279,11 @@ else fi if [ -n "$ERROR" ] ; then - log "There was an error during execution of stage 'fai dirinstall' [$(date)]" + 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}]" - eend 1 ; exit 1 + eend 1 + bailout 1 else log "Finished execution of stage 'fai dirinstall' [$(date)]" einfo "Finished execution of stage 'fai dirinstall'"