[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Ovirt-devel] [PATCH] * ovirt-logrotate (EXITVALUE): Propagate failure to exit, too.



Jim Meyering wrote:
Here's an even tinier change:
Without this, a failing ovirt-logrotate would exit successfully.

From 2691a4203489e250fa1e8d64e3c52072f25929a3 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Mon, 8 Sep 2008 11:43:06 +0200
Subject: [PATCH] * ovirt-logrotate (EXITVALUE): Propagate failure to exit, too.

---
 logrotate/ovirt-logrotate |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/logrotate/ovirt-logrotate b/logrotate/ovirt-logrotate
index f0a2dde..a6a394d 100644
--- a/logrotate/ovirt-logrotate
+++ b/logrotate/ovirt-logrotate
@@ -6,5 +6,4 @@ EXITVALUE=$?
 if [ $EXITVALUE != 0 ]; then
     /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
 fi
-exit 0
-
+exit $EXITVALUE

What happens if a logrotate script returns a non-zero value? Is there something that we need to catch and handle here?

Perry


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]