aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>2024-01-10 11:48:56 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>2024-01-24 12:08:58 +0000
commitf148fbe153738776c0e2263754e38cf7e0beb63e (patch)
tree6d28dddbd71b55691fad47ce441c45209e9aa5ef
parentdf6f381ac6d9a92a146cc2cb36e403dbc9bd1f7e (diff)
downloadsrc-f148fbe153738776c0e2263754e38cf7e0beb63e.tar.gz
src-f148fbe153738776c0e2263754e38cf7e0beb63e.zip
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)
-rwxr-xr-xusr.sbin/periodic/etc/security/800.loginfail5
-rwxr-xr-xusr.sbin/periodic/etc/security/900.tcpwrap5
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
}