FreeBSD Bugzilla – Attachment 9526 Details for
Bug 19483
option to compress accounting files in /var/account
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.65 KB, created by
Ben Smithurst
on 2000-06-24 04:50:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Ben Smithurst
Created:
2000-06-24 04:50:00 UTC
Size:
1.65 KB
patch
obsolete
>Index: defaults/periodic.conf >=================================================================== >RCS file: /usr/cvs/src/etc/defaults/periodic.conf,v >retrieving revision 1.1 >diff -u -r1.1 periodic.conf >--- periodic.conf 2000/06/23 01:18:21 1.1 >+++ periodic.conf 2000/06/23 23:42:19 >@@ -68,6 +68,7 @@ > > # 310.accounting > daily_accounting_enable="YES" # Rotate acct files >+daily_accounting_compress="NO" # Gzip rotated files > > # 320.distfile > daily_distfile_enable="YES" # Run rdist daily >Index: periodic/daily/310.accounting >=================================================================== >RCS file: /usr/cvs/src/etc/periodic/daily/310.accounting,v >retrieving revision 1.4 >diff -u -r1.4 310.accounting >--- 310.accounting 2000/06/23 01:18:23 1.4 >+++ 310.accounting 2000/06/23 23:25:56 >@@ -19,10 +19,28 @@ > echo "Rotating accounting logs and gathering statistics:" > > cd /var/account >- [ -f acct.2 ] && mv -f acct.2 acct.3 >- [ -f acct.1 ] && mv -f acct.1 acct.2 >- [ -f acct.0 ] && mv -f acct.0 acct.1 >+ >+ # Delete any old files left around if the user changes from >+ # non-compressed to compressed or vice-versa. >+ find . -name 'acct.*' -mtime +5 -delete >+ >+ # Does the user want the files compressed? >+ case "$daily_accounting_compress" in >+ [Yy][Ee][Ss]) >+ ext=".gz" ;; >+ *) >+ ext="" ;; >+ esac >+ >+ [ -f acct.2$ext ] && mv -f acct.2$ext acct.3$ext >+ [ -f acct.1$ext ] && mv -f acct.1$ext acct.2$ext >+ [ -f acct.0$ext ] && mv -f acct.0$ext acct.1$ext > cp -pf acct acct.0 > sa -s >/dev/null >+ >+ case "$daily_accounting_compress" in >+ [Yy][Ee][Ss]) >+ gzip -f acct.0 ;; >+ esac > fi;; > esac
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19483
: 9526