Handle .bz2 files created by newsyslog

PR:			37529
Partially submitted by:	Peter Hollaubek <fifteen@inext.hu>
MFC after:		1 week
This commit is contained in:
brian 2002-04-30 17:07:32 +00:00
parent 2d4af411cc
commit 0e37ad70ef
2 changed files with 7 additions and 0 deletions

View File

@ -43,6 +43,9 @@ case "$daily_status_mail_rejects_enable" in
elif [ -f /var/log/maillog.$n.gz ]
then
zcat -fc /var/log/maillog.$n.gz
elif [ -f /var/log/maillog.$n.bz2 ]
then
bzcat -fc /var/log/maillog.$n.bz2
fi
n=$(($n - 1))
done

View File

@ -22,6 +22,10 @@ case "$monthly_accounting_enable" in
then
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
else
echo '$monthly_accounting_enable is set but' \
"$W.0 doesn't exist"