[Fai-commit] r3526 - in people/mugwump/vserver: . examples/simple/hooks

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Mon Jun 19 07:52:41 UTC 2006


Author: samv-guest
Date: 2006-06-19 07:52:40 +0000 (Mon, 19 Jun 2006)
New Revision: 3526

Modified:
   people/mugwump/vserver/
   people/mugwump/vserver/examples/simple/hooks/subroutines
Log:
Add a savelog task to the example subroutines



Property changes on: people/mugwump/vserver
___________________________________________________________________
Name: svk:merge
   - d29f7b36-84ff-0310-85ce-ba787dbd31ca:/local/fai/people/mugwump/vserver:10465
   + d29f7b36-84ff-0310-85ce-ba787dbd31ca:/local/fai/people/mugwump/vserver:10466

Modified: people/mugwump/vserver/examples/simple/hooks/subroutines
===================================================================
--- people/mugwump/vserver/examples/simple/hooks/subroutines	2006-06-19 07:51:32 UTC (rev 3525)
+++ people/mugwump/vserver/examples/simple/hooks/subroutines	2006-06-19 07:52:40 UTC (rev 3526)
@@ -68,4 +68,16 @@
         task vschild_updatebase
         task instsoft
         task configure
+	task savelog
 }
+
+task_savelog() {
+
+    [ -d $target/var/log/fai ] || mkdir -p $target/var/log/fai
+    [ -d $target/var/log/fai ] && fai-savelog -l
+    [ -f $LOGDIR/FAI_CLASSES ] && cp -p $LOGDIR/FAI_CLASSES $target/var/log/fai
+    [ -f $LOGDIR/variables.sh ] && cp -p $LOGDIR/variables.sh $target/var/log/fai
+    [ "x$diskvar" != "x" -a "$diskvar" != "/var/log/fai/disk_var.sh" -a -f "$diskvar" ] && cp -p $diskvar $target/var/log/fai
+    fai-savelog -r
+}
+




More information about the Fai-commit mailing list