Adjust logfile handling for new FAI; support grml2ram bootoption
[grml-live.git] / grml-live
index 877bb1e..ca826c6 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2 or any later version.
-# Latest change: Mon Nov 05 09:24:45 CET 2007 [mika]
+# Latest change: Sun Nov 25 16:35:35 CET 2007 [mika]
 ################################################################################
 
 # read configuration files, set some misc variables {{{
@@ -15,7 +15,7 @@ export LC_ALL=C
 # exit on any error:
 set -e
 
-GRML_LIVE_VERSION='0.0.7'
+GRML_LIVE_VERSION='0.0.10'
 CMDLINE="$0 $@"
 ISO_DATE="$(date +%Y-%m-%d)"
 
@@ -341,11 +341,7 @@ else
 
    # notice: 'fai dirinstall' does not seem to exit appropriate, so:
    ERROR=''
-   if [ -n "$UPDATE" ] ; then
-      CHECKLOG=/var/log/fai/current/
-   else
-      CHECKLOG=/var/log/fai/dirinstall/$HOSTNAME/
-   fi
+   CHECKLOG=/var/log/fai/$HOSTNAME/last
    if [ -r "$CHECKLOG/software.log" ] ; then
       # 1 errors during executing of commands
       # Unable to write mmap - msync (28 No space left on device)
@@ -391,6 +387,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then
       INITRD="$(ls $CHROOT_OUTPUT/boot/initrd* 2>/dev/null| grep -v '.bak$' | sort -r | head -1)"
       if [ -n "$INITRD" ] ; then
          cp $INITRD "$BUILD_OUTPUT"/boot/isolinux/initrd.gz
+         find $CHROOT_OUTPUT/boot/ -name initrd\*.bak -exec rm {} \;
       else
          log "No initrd found inside $CHROOT_OUTPUT/boot/ - Exiting"
          eerror "No initrd found inside $CHROOT_OUTPUT/boot/ - Exiting" ; eend 1
@@ -398,7 +395,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then
       fi
 
       KERNEL_IMAGE="$(ls $CHROOT_OUTPUT/boot/vmlinuz* 2>/dev/null | sort -r | head -1)"
-      if [ -n "$INITRD" ] ; then
+      if [ -n "$KERNEL_IMAGE" ] ; then
          cp "$KERNEL_IMAGE" "$BUILD_OUTPUT"/boot/isolinux/linux26
       else
          log "No kernel found inside $CHROOT_OUTPUT/boot/ - Exiting"