Warning!

Notice: the grml team is migrating from Mercurial to Git.
Please visit git.grml.org instead!

Log to /var/log/grml-live.log by default and support $ZERO_LOGFILE
authorMichael Prokop
Sun Oct 28 14:45:22 2007 +0100 (13 months ago)
changeset 223352a61d4c56e
manifest352a61d4c56e
parent 2222631e3fcfbfe
child 224fc9510e7dca4
Log to /var/log/grml-live.log by default and support $ZERO_LOGFILE
debian/changelog
etc/grml/grml-live.conf
grml-live
--- a/debian/changelog Sun Oct 28 00:47:06 2007 +0200
+++ b/debian/changelog Sun Oct 28 14:45:22 2007 +0100
@@ -9,6 +9,8 @@ grml-live (0.0.7) unstable; urgency=low
- buildd/functions.sh: do not mv files if there was an error
during grml-live execution
- do not re-execute grml-live is the target ISO exists already
+ * Log to /var/log/grml-live.log by default now and support
+ $ZERO_LOGFILE for cleaning up logs.
* Added new grml-repository named grml-live which is intented
to fix issues from Debian for grml-live builds. It is automatically
activated if you are building against unstable/sid and should
--- a/etc/grml/grml-live.conf Sun Oct 28 00:47:06 2007 +0200
+++ b/etc/grml/grml-live.conf Sun Oct 28 14:45:22 2007 +0100
@@ -3,7 +3,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: Sat Oct 06 17:34:28 CEST 2007 [mika]
+# Latest change: Sun Oct 28 14:43:46 CET 2007 [mika]
################################################################################
# Main output directory
@@ -18,6 +18,12 @@ BUILD_OUTPUT="$OUTPUT/grml_cd"
BUILD_OUTPUT="$OUTPUT/grml_cd"
# Where do you want to find the final ISO?
ISO_OUTPUT="$OUTPUT/grml_isos"
+
+# Do you want to zero / clean up the logfile on each grml-live execution?
+# Especially useful if you are using an autobuild setup where you want
+# store /var/log/grml-live.log after each invocation of grml-live.
+# Default: unset (so do not zero the logfile)
+#ZERO_LOGFILE='1'
# Which Debian suite to you want to use? Unless it is set it defaults to "etch"
# Supported values are: etch, lenny, sid
--- a/grml-live Sun Oct 28 00:47:06 2007 +0200
+++ b/grml-live Sun Oct 28 14:45:22 2007 +0100
@@ -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: Wed Oct 24 10:11:02 CEST 2007 [mika]
+# Latest change: Sun Oct 28 14:43:27 CET 2007 [mika]
################################################################################
# read configuration files, set some misc variables {{{
@@ -71,8 +71,17 @@ trap bailout 1 2 3 15
[ -n "$RELEASENAME" ] || RELEASENAME="grml-live rocks"
[ -n "$GRML_NAME" ] || GRML_NAME='grml'
-[ -d /var/log/grml-live ] || mkdir /var/log/grml-live
-LOGFILE=/var/log/grml-live/"$(date +%Y-%m-%d)_$$.log"
+# logfile:
+if [ -z "$LOGFILE" ] ; then
+ LOGFILE=/var/log/grml-live.log
+fi
+touch $LOGFILE
+chown root:adm $LOGFILE
+chmod 640 $LOGFILE
+# clean/zero logfile:
+if [ -n "$ZERO_LOGFILE" ] ; then
+ echo -n > $LOGFILE
+fi
NFSROOT_CONF=/etc/grml/fai/make-fai-nfsroot.conf