Skip to contentSkip to conversation

standalone: do not rotate empty log files.

PATCH In review Ian Campbell 2 participants 3 messages Oct 7, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 standalone: do not rotate empty log files.

By passing -n to savelog.

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

---
 standalone | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
standalone +1 -1
index 27e2e7d..d9c927f 100755
@@ -192,7 +192,7 @@ ensure_logs() {
 with_logging() {
     local log=$1; shift
     ensure_logs
-    savelog -c 300 "$log" >/dev/null
+    savelog -c -n 300 "$log" >/dev/null
     "$@" 2>&1 | tee "$log"
     rc=${PIPESTATUS[0]}
     if [ $rc -ne 0 ] ; then
Signature · 1 line
2.5.3
Acked-by on v1 1/1
#1 lore raw

Ian Campbell writes ("[PATCH OSSTEST] standalone: do not rotate empty log files."):

Quoted 4 lines

By passing -n to savelog.

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

#2 lore raw
Quoted 8 lines · Ian Jackson

Ian Campbell writes ("[PATCH OSSTEST] standalone: do not rotate empty log files."):

Quoted 4 lines

By passing -n to savelog.

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

"savelog -c -n 300" is bogus, it needs to be "savelog -c 300 -n".

I could have sworn I ran it...