From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH OSSTEST] standalone: do not rotate empty log files. Date: Wed, 7 Oct 2015 09:25:45 +0100 Message-ID: <1444206345-21659-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- standalone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standalone b/standalone index 27e2e7d..d9c927f 100755 --- a/standalone +++ b/standalone @@ -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 -- 2.5.3