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