]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
standalone: do not rotate empty log files.
authorIan Campbell <ian.campbell@citrix.com>
Wed, 7 Oct 2015 08:22:32 +0000 (09:22 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 8 Oct 2015 16:17:54 +0000 (17:17 +0100)
By passing -n to savelog.

In particular this prevents the creation of an empty $log.0 on first
use when $log doesn't exist.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
standalone

index 27e2e7db4663178013aea6990a3e6bf0ec9af674..20a6ad54879d866d27f8419209e5f321a4e451e8 100755 (executable)
@@ -192,7 +192,7 @@ ensure_logs() {
 with_logging() {
     local log=$1; shift
     ensure_logs
-    savelog -c 300 "$log" >/dev/null
+    savelog -c 300 -n "$log" >/dev/null
     "$@" 2>&1 | tee "$log"
     rc=${PIPESTATUS[0]}
     if [ $rc -ne 0 ] ; then