Bug 172230

Summary: logwatch breaks on a stricter sort
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: logwatchAssignee: Ivana Varekova <varekova>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-02 12:44:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2005-11-01 19:16:44 UTC
Description of problem:

In /usr/share/logwatch/scripts/services/zz-disk_space on line 112 has an
obsolete "+4" option to sort and as result with sort from coreutils-5.92-1
it fails with "sort: open failed: +4: No such file or directory".

After replacing "+4" with "-k 5" logwatch starts work again.

AFAICS this is the only instance of using sort with "+<num>" option in all
logwatch scripts.

Version-Release number of selected component (if applicable):
logwatch-7.0-1

Comment 1 Michal Jaegermann 2005-11-01 19:52:11 UTC
Come to think of it the line 112 of zz-disk_space is truly weird.
First it has grep feding awk instead of awk putting a regexp condition,
like '/^\//$awkprog', in front of $awkprog.  The second I do not understand
what an incriminated sort was supposed to achieve.  It sorts in
"64% %7 %87" order.  Was 'sort -b -n -k 5' really intended?  Or maybe even
'sort -b -r -n -k 5'?  This is not same thing as what is there now.

Comment 2 Ivana Varekova 2005-11-02 12:44:14 UTC
Thank you for your bug report.
This problem is fixed in the last version (logwatch-7.0-2).