Red Hat Bugzilla – Bug 172230
logwatch breaks on a stricter sort
Last modified: 2007-11-30 17:11:16 EST
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
Version-Release number of selected component (if applicable):
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.
Thank you for your bug report.
This problem is fixed in the last version (logwatch-7.0-2).