git: f148fbe15373 - stable/13 - periodic: Fix periodic reports when log files are not compressed.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 24 Jan 2024 12:09:51 UTC
The branch stable/13 has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=f148fbe153738776c0e2263754e38cf7e0beb63e commit f148fbe153738776c0e2263754e38cf7e0beb63e Author: Yoshihiro Takahashi <nyan@FreeBSD.org> AuthorDate: 2024-01-10 11:48:56 +0000 Commit: Yoshihiro Takahashi <nyan@FreeBSD.org> CommitDate: 2024-01-24 12:08:58 +0000 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 1fa4ddcc6de6a0c46416f719a5b7efa1169f51ce) --- usr.sbin/periodic/etc/security/800.loginfail | 5 +---- usr.sbin/periodic/etc/security/900.tcpwrap | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/usr.sbin/periodic/etc/security/800.loginfail b/usr.sbin/periodic/etc/security/800.loginfail index 713f4fed47bf..c5a3a972aaa1 100755 --- a/usr.sbin/periodic/etc/security/800.loginfail +++ b/usr.sbin/periodic/etc/security/800.loginfail @@ -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 } diff --git a/usr.sbin/periodic/etc/security/900.tcpwrap b/usr.sbin/periodic/etc/security/900.tcpwrap index 132bc9865b18..55fa58f4df39 100755 --- a/usr.sbin/periodic/etc/security/900.tcpwrap +++ b/usr.sbin/periodic/etc/security/900.tcpwrap @@ -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 }