Red Hat Bugzilla – Bug 461494
Bad exit code when logrotate.status is corrupt (0)
Last modified: 2013-04-15 04:59:37 EDT
Description of problem:
While testing bug 431836 I noticed that when /var/lib/logrotate.status is corrupt, logrotate exits with error messages, but with exit code of 0, which indicates a success.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
%> logrotate -f /etc/logrotate.d/yum
error: bad line 2 in state file /var/lib/logrotate.status
error: could not read state file, will not attempt to write into it
$> echo $?
exit code 0
exit code >= 1
You're right -- the corrupted status file should be indicated somehow. I believe this error is also present in the latest upstream version.
Adding Dan to cc list -- he should become the logrotate maintainer for RHEL in short time. Also a patch was commited upstream (rev. 258).
Created attachment 359810 [details]
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
This request was erroneously denied for the current release of
Red Hat Enterprise Linux. The error has been fixed and this
request has been re-proposed for the current release.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.