[Fai-commit] r3059 - in people/michael/features/logtail: debian scripts share

fai-repository at svn.debian.org fai-repository at svn.debian.org
Thu Nov 17 19:15:59 UTC 2005


Author: michael-guest
Date: 2005-11-17 19:15:58 +0000 (Thu, 17 Nov 2005)
New Revision: 3059

Modified:
   people/michael/features/logtail/debian/control
   people/michael/features/logtail/scripts/fai
   people/michael/features/logtail/share/subroutines
Log:
added support for logtail to prevent those old log entries from begin caught by
fai again and again


Modified: people/michael/features/logtail/debian/control
===================================================================
--- people/michael/features/logtail/debian/control	2005-11-17 19:08:52 UTC (rev 3058)
+++ people/michael/features/logtail/debian/control	2005-11-17 19:15:58 UTC (rev 3059)
@@ -9,7 +9,7 @@
 Architecture: all
 Depends: perl, libapt-pkg-perl
 Recommends: debootstrap, nfs-kernel-server | nfs-server, fai-kernels, dhcp3-server | bootp, tftpd-hpa | tftpd, rsh-server, wget, syslinux
-Suggests: ssh, debmirror, mknbi, apt-move, mkinitrd-cd, grub
+Suggests: ssh, debmirror, mknbi, apt-move, mkinitrd-cd, grub, logtail
 Description:  Fully Automatic Installation
  FAI is a non-interactive system to install a Debian GNU/Linux operating
  system unattended on a PC cluster. You can take one or more virgin

Modified: people/michael/features/logtail/scripts/fai
===================================================================
--- people/michael/features/logtail/scripts/fai	2005-11-17 19:08:52 UTC (rev 3058)
+++ people/michael/features/logtail/scripts/fai	2005-11-17 19:15:58 UTC (rev 3059)
@@ -118,6 +118,10 @@
     [ $DO_INIT_TASKS -eq 0 ] && LOGDIR=$(mktemp -t -d fai.XXXXXX)
     ln -s $LOGDIR $rundir/current_log
 
+    if [ $DO_INIT_TASKS -eq 0 -a -x /usr/sbin/logtail ] ; then
+      logtail -f /var/log/kern.log -o $rundir/kern.log.offset > /dev/null
+    fi
+
     # several log files
     diskvar=$LOGDIR/disk_var.sh
     moduleslog=$LOGDIR/modules.log

Modified: people/michael/features/logtail/share/subroutines
===================================================================
--- people/michael/features/logtail/share/subroutines	2005-11-17 19:08:52 UTC (rev 3058)
+++ people/michael/features/logtail/share/subroutines	2005-11-17 19:15:58 UTC (rev 3059)
@@ -70,8 +70,13 @@
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 save_dmesg() {
-
-    dmesg > $LOGDIR/dmesg.log
+  
+    if [ -r $rundir/kern.log.offset ] ; then
+      logtail -f /var/log/kern.log -o $rundir/kern.log.offset > $LOGDIR/dmesg.log
+      rm $rundir/kern.log.offset
+    else
+      dmesg > $LOGDIR/dmesg.log
+    fi
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 wait_for_jobs() {




More information about the Fai-commit mailing list