[Fai-commit] r5203 - people/michael/experimental/patches

mt at alioth.debian.org mt at alioth.debian.org
Thu Oct 16 20:47:37 UTC 2008


Author: mt
Date: 2008-10-16 20:47:37 +0000 (Thu, 16 Oct 2008)
New Revision: 5203

Modified:
   people/michael/experimental/patches/logtail
Log:
task_savelog isn't the proper way as well, because the error filtering hook
would never get to see the kernel logs; instead, the code was split


Modified: people/michael/experimental/patches/logtail
===================================================================
--- people/michael/experimental/patches/logtail	2008-10-16 20:10:31 UTC (rev 5202)
+++ people/michael/experimental/patches/logtail	2008-10-16 20:47:37 UTC (rev 5203)
@@ -33,23 +33,24 @@
 ===================================================================
 --- trunk.orig/lib/subroutines
 +++ trunk/lib/subroutines	
-@@ -82,7 +82,6 @@
- }
+@@ -83,7 +83,11 @@
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  save_dmesg() {
--
-     dmesg > $LOGDIR/dmesg.log
+ 
+-    dmesg > $LOGDIR/dmesg.log
++    if [ -r /var/run/fai/kern.log.offset ] ; then
++      logtail -t -f /var/log/kern.log -o /var/run/fai/kern.log.offset > $LOGDIR/dmesg.log
++    else
++      dmesg > $LOGDIR/dmesg.log
++    fi
  }
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@@ -416,6 +415,11 @@
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- task_savelog() {
+ wait_for_jobs() {
+@@ -418,6 +422,7 @@
  
-+    if [ -r /var/run/fai/kern.log.offset ] ; then
-+      logtail -f /var/log/kern.log -o /var/run/fai/kern.log.offset > $LOGDIR/dmesg.log
-+      rm /var/run/fai/kern.log.offset
-+    fi
-+
      mkdir -p $FAI_ROOT/var/lib/fai
      mkdir -p $FAI_ROOT/var/log/fai
++    rm -f /var/run/fai/kern.log.offset
      fai-savelog -l
+     [ -f $LOGDIR/FAI_CLASSES ] && cp -pu $LOGDIR/FAI_CLASSES $FAI_ROOT/var/lib/fai
+     [ -f $LOGDIR/disk_var.sh ] && cp -pu $LOGDIR/disk_var.sh $FAI_ROOT/var/lib/fai




More information about the Fai-commit mailing list