Blame SOURCES/0040-customize-firstboot-fix-Linux-log-output.patch

0d20ef
From 839b3d82f37159f02d5c188367dcb157f5b3da4e Mon Sep 17 00:00:00 2001
0d20ef
From: Pino Toscano <ptoscano@redhat.com>
0d20ef
Date: Tue, 4 Nov 2014 09:16:17 +0100
0d20ef
Subject: [PATCH] customize: firstboot: fix Linux log output
0d20ef
0d20ef
Pass -a to each tee invocation, otherwise just the last one (so only for
0d20ef
the last script executed) will appear in the log file.
0d20ef
0d20ef
(cherry picked from commit 25cad1e62fa73e9cfd9a0e3d1d330165b19339ec)
0d20ef
---
0d20ef
 customize/firstboot.ml | 8 ++++----
0d20ef
 1 file changed, 4 insertions(+), 4 deletions(-)
0d20ef
0d20ef
diff --git a/customize/firstboot.ml b/customize/firstboot.ml
0d20ef
index 1b92194..594f5b8 100644
0d20ef
--- a/customize/firstboot.ml
0d20ef
+++ b/customize/firstboot.ml
0d20ef
@@ -49,8 +49,8 @@ d=%s/scripts
0d20ef
 d_done=%s/scripts-done
0d20ef
 logfile=~root/virt-sysprep-firstboot.log
0d20ef
 
0d20ef
-echo \"$0\" \"$@\" 2>&1 | tee $logfile
0d20ef
-echo \"Scripts dir: $d\" 2>&1 | tee $logfile
0d20ef
+echo \"$0\" \"$@\" 2>&1 | tee -a $logfile
0d20ef
+echo \"Scripts dir: $d\" 2>&1 | tee -a $logfile
0d20ef
 
0d20ef
 if test \"$1\" = \"start\"
0d20ef
 then
0d20ef
@@ -61,8 +61,8 @@ then
0d20ef
       # move the script to the 'scripts-done' directory, so it is not
0d20ef
       # executed again at the next boot
0d20ef
       mv $f $d_done
0d20ef
-      echo '=== Running' $f '===' 2>&1 | tee $logfile
0d20ef
-      $d_done/$(basename $f) 2>&1 | tee $logfile
0d20ef
+      echo '=== Running' $f '===' 2>&1 | tee -a $logfile
0d20ef
+      $d_done/$(basename $f) 2>&1 | tee -a $logfile
0d20ef
     fi
0d20ef
   done
0d20ef
   rm -f $d_done/*
0d20ef
-- 
0d20ef
1.8.3.1
0d20ef