Am 2014-10-07 15:12, schrieb Thomas Lange:
commit cb3aaf0101d82c61a4c4797ca91ecc0d90e50402 includes your patch.
Thanks a lot.

Thank you very much for your quick reaction.

Unfortunately, upon looking at the git history, I just saw that my patch
is only partially correct: I copied the code from the task() function,
but there the local variable $taskname is set, which it isn't inside
die().

For my purposes, the original patch still works (thus I didn't notice
the error), because the original task_savelog just fails, prints an
error (which isn't backed up) and then the computer reboots, while the
hook that is run earlier is successful in copying the logs up until then.

Hence, skipping savelog will not work properly with my original patch,
I've attached a followup patch against current git to fix this.

Sorry for not being more thorough in the first place.

Kind regards,
Christian Seiler
From e8e0163e981bb57ebe7edfdc758d6ce9e9a51b9b Mon Sep 17 00:00:00 2001
From: Christian Seiler <christ...@iwakd.de>
Date: Tue, 7 Oct 2014 15:28:46 +0200
Subject: [PATCH] Bugfix: make skipping savelog task actually work

---
 lib/subroutines |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/subroutines b/lib/subroutines
index 8981fbc..7d6d7e3 100755
--- a/lib/subroutines
+++ b/lib/subroutines
@@ -34,8 +34,8 @@
 die() {
 
     # echo comment and exit installation
-    [ -f $LOGDIR/skip.$taskname ] || call_hook savelog
-    [ -f $LOGDIR/skip.$taskname ] || task_savelog
+    [ -f $LOGDIR/skip.savelog ] || call_hook savelog
+    [ -f $LOGDIR/skip.savelog ] || task_savelog
     echo "$@"
     if [ X$FAI_ACTION = Xinstall ]; then
         exec bash -i
-- 
1.7.10.4

Reply via email to