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

(cherry picked from commit 1fa4ddcc6d)
This commit is contained in:
Yoshihiro Takahashi 2024-01-10 20:48:56 +09:00
parent df6f381ac6
commit f148fbe153
2 changed files with 2 additions and 8 deletions

View file

@ -49,10 +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;;
esac
zcat -f $f
done
[ -f ${LOG}/auth.log ] && cat $LOG/auth.log
}

View file

@ -49,10 +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;;
esac
zcat -f $f
done
[ -f ${LOG}/messages ] && cat $LOG/messages
}