Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112041536
D29267.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D29267.diff
View Options
diff --git a/share/man/man5/periodic.conf.5 b/share/man/man5/periodic.conf.5
--- a/share/man/man5/periodic.conf.5
+++ b/share/man/man5/periodic.conf.5
@@ -365,7 +365,7 @@
.Pq Vt bool
Set to
.Dq Li YES
-if you want to rotate your daily accounting files.
+if you want to rotate your daily process accounting files.
No rotations are necessary unless
.Va accounting_enable
is enabled in
diff --git a/usr.sbin/newsyslog/newsyslog.conf.5 b/usr.sbin/newsyslog/newsyslog.conf.5
--- a/usr.sbin/newsyslog/newsyslog.conf.5
+++ b/usr.sbin/newsyslog/newsyslog.conf.5
@@ -415,6 +415,7 @@
.Xr bzip2 1 ,
.Xr gzip 1 ,
.Xr xz 1 ,
+.Xr zstd 1 ,
.Xr syslog 3 ,
.Xr chown 8 ,
.Xr newsyslog 8 ,
diff --git a/usr.sbin/periodic/etc/daily/460.status-mail-rejects b/usr.sbin/periodic/etc/daily/460.status-mail-rejects
--- a/usr.sbin/periodic/etc/daily/460.status-mail-rejects
+++ b/usr.sbin/periodic/etc/daily/460.status-mail-rejects
@@ -52,6 +52,12 @@
elif [ -f /var/log/maillog.$n.bz2 ]
then
bzcat -fc /var/log/maillog.$n.bz2
+ elif [ -f /var/log/maillog.$n.xz ]
+ then
+ xzcat -f /var/log/maillog.$n.xz
+ elif [ -f /var/log/maillog.$n.zst ]
+ then
+ zstdcat -fc /var/log/maillog.$n.zst
fi
n=$(($n - 1))
done
diff --git a/usr.sbin/periodic/etc/monthly/200.accounting b/usr.sbin/periodic/etc/monthly/200.accounting
--- a/usr.sbin/periodic/etc/monthly/200.accounting
+++ b/usr.sbin/periodic/etc/monthly/200.accounting
@@ -18,16 +18,30 @@
W=/var/log/utx.log
rc=0
remove=NO
+ filetoread=$W.0
if [ ! -f $W.0 ]
then
- if [ -f $W.0.gz ]
+ if [ -f $W.0.gz ] || [ -f $W.0.bz2 ] || [ -f $W.0.xz ] || [ -f $W.0.zst ]
then
+ TMP=`mktemp -t accounting`
remove=YES
- zcat $W.0.gz > $W.0 || rc=1
- elif [ -f $W.0.bz2 ]
- then
- remove=YES
- bzcat $W.0.bz2 > $W.0 || rc=1
+ filetoread=$TMP
+ if [ -f $W.0.gz ]
+ then
+ zcat $W.0.gz > $TMP || rc=1
+ elif [ -f $W.0.bz2 ]
+ then
+ bzcat $W.0.bz2 > $TMP || rc=1
+ elif [ -f $W.0.xz ]
+ then
+ xzcat $W.0.xz > $TMP || rc=1
+ elif [ -f $W.0.zst ]
+ then
+ zstdcat $W.0.zst > $TMP || rc=1
+ else
+ # shouldn't get here, unless something disappeared under us.
+ rc=2
+ fi
else
echo '$monthly_accounting_enable is set but' \
"$W.0 doesn't exist"
@@ -39,10 +53,10 @@
echo ""
echo "Doing login accounting:"
- rc=$(ac -p -w $W.0 | sort -nr -k 2 | tee /dev/stderr | wc -l)
+ rc=$(ac -p -w $filetoread | sort -nr -k 2 | tee /dev/stderr | wc -l)
[ $rc -gt 0 ] && rc=1
fi
- [ $remove = YES ] && rm -f $W.0;;
+ [ $remove = YES ] && rm -f $TMP;;
*) rc=0;;
esac
diff --git a/usr.sbin/periodic/etc/security/800.loginfail b/usr.sbin/periodic/etc/security/800.loginfail
--- a/usr.sbin/periodic/etc/security/800.loginfail
+++ b/usr.sbin/periodic/etc/security/800.loginfail
@@ -53,6 +53,8 @@
case $f in
*.gz) zcat -f $f;;
*.bz2) bzcat -f $f;;
+ *.xz) xzcat -f $f;;
+ *.zst) zstdcat -f $f;;
esac
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
--- a/usr.sbin/periodic/etc/security/900.tcpwrap
+++ b/usr.sbin/periodic/etc/security/900.tcpwrap
@@ -53,6 +53,8 @@
case $f in
*.gz) zcat -f $f;;
*.bz2) bzcat -f $f;;
+ *.xz) xzcat -f $f;;
+ *.zst) zstdcat -f $f;;
esac
done
[ -f ${LOG}/messages ] && cat $LOG/messages
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 12, 11:41 PM (14 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17127548
Default Alt Text
D29267.diff (3 KB)
Attached To
Mode
D29267: PR 253868: Periodic issues
Attached
Detach File
Event Timeline
Log In to Comment