periodic: Fix periodic reports when log files are not compressed.
The modern zcat(1) is capable of handling compressed and uncompressed text files, so we can simply use zcat command. PR: 253168 Reviewed by: delphij MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43357
This commit is contained in:
parent
f552d7adeb
commit
1fa4ddcc6d
|
@ -49,12 +49,7 @@ catmsgs() {
|
|||
sort -t. -r -n -k 2,2 |
|
||||
while read f
|
||||
do
|
||||
case $f in
|
||||
*.gz) zcat -f $f;;
|
||||
*.bz2) bzcat -f $f;;
|
||||
*.xz) xzcat -f $f;;
|
||||
*.zst) zstdcat -f $f;;
|
||||
esac
|
||||
zcat -f $f
|
||||
done
|
||||
[ -f ${LOG}/auth.log ] && cat $LOG/auth.log
|
||||
}
|
||||
|
|
|
@ -49,12 +49,7 @@ catmsgs() {
|
|||
sort -t. -r -n -k 2,2 |
|
||||
while read f
|
||||
do
|
||||
case $f in
|
||||
*.gz) zcat -f $f;;
|
||||
*.bz2) bzcat -f $f;;
|
||||
*.xz) xzcat -f $f;;
|
||||
*.zst) zstdcat -f $f;;
|
||||
esac
|
||||
zcat -f $f
|
||||
done
|
||||
[ -f ${LOG}/messages ] && cat $LOG/messages
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue