Jim Meyering
2008-Sep-08 12:39 UTC
[Ovirt-devel] [PATCH] * ovirt-logrotate (EXITVALUE): Propagate failure to exit, too.
Here's an even tinier change: Without this, a failing ovirt-logrotate would exit successfully.>From 2691a4203489e250fa1e8d64e3c52072f25929a3 Mon Sep 17 00:00:00 2001From: Jim Meyering <meyering at 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 -- 1.6.0.1.196.g01914
Perry N. Myers
2008-Sep-08 12:46 UTC
[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 at 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 $EXITVALUEWhat happens if a logrotate script returns a non-zero value? Is there something that we need to catch and handle here? Perry