From: | "Jeroen Roovers (jer)" <jer@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-process/acct/files: acct.logrotate acct.initd acct.rc6 |
Date: | Wed, 28 Apr 2010 19:43:10 |
Message-Id: | 20100428193240.7C9DF2C06D@corvid.gentoo.org |
1 | jer 10/04/28 19:32:40 |
2 | |
3 | Added: acct.logrotate acct.initd |
4 | Removed: acct.rc6 |
5 | Log: |
6 | Rename initd script to be more Gentoo like. Bump to add logrotate script thanks to Jeremy Sermersheim (bug #313099). |
7 | (Portage version: 2.2_rc67/cvs/Linux i686) |
8 | |
9 | Revision Changes Path |
10 | 1.1 sys-process/acct/files/acct.logrotate |
11 | |
12 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-process/acct/files/acct.logrotate?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-process/acct/files/acct.logrotate?rev=1.1&content-type=text/plain |
14 | |
15 | Index: acct.logrotate |
16 | =================================================================== |
17 | # Logrotate file for acct |
18 | |
19 | /var/account/pacct { |
20 | prerotate |
21 | if [ -h /lib/rc/init.d/started/acct ]; then |
22 | /etc/init.d/acct stop > /dev/null 2>&1 || true |
23 | fi |
24 | endscript |
25 | compress |
26 | delaycompress |
27 | notifempty |
28 | daily |
29 | rotate 31 |
30 | create 0600 root root |
31 | postrotate |
32 | if [ -h /lib/rc/init.d/started/acct ]; then |
33 | /etc/init.d/acct start > /dev/null 2>&1 || true |
34 | fi |
35 | endscript |
36 | } |
37 | |
38 | |
39 | |
40 | 1.1 sys-process/acct/files/acct.initd |
41 | |
42 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-process/acct/files/acct.initd?rev=1.1&view=markup |
43 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-process/acct/files/acct.initd?rev=1.1&content-type=text/plain |
44 | |
45 | Index: acct.initd |
46 | =================================================================== |
47 | #!/sbin/runscript |
48 | # Copyright 1999-2009 Gentoo Foundation |
49 | # Distributed under the terms of the GNU General Public License v2 |
50 | # $Header: /var/cvsroot/gentoo-x86/sys-process/acct/files/acct.initd,v 1.1 2010/04/28 19:32:40 jer Exp $ |
51 | |
52 | opts="report" |
53 | |
54 | depend() { |
55 | need localmount |
56 | } |
57 | |
58 | checkconfig() { |
59 | export ACCT_LOG=${ACCT_LOG:-/var/account/pacct} |
60 | if [[ ! -e ${ACCT_LOG} ]] ; then |
61 | touch "${ACCT_LOG}" |
62 | chmod 600 "${ACCT_LOG}" |
63 | fi |
64 | return 0 |
65 | } |
66 | |
67 | start() { |
68 | checkconfig || return 1 |
69 | |
70 | ebegin "Starting accounting" |
71 | accton "${ACCT_LOG}" |
72 | eend $? |
73 | } |
74 | |
75 | stop() { |
76 | ebegin "Stopping accounting" |
77 | accton off |
78 | eend $? |
79 | } |
80 | |
81 | report() { |
82 | sa ${REPORT_OPTS} "${ACCT_LOG}" |
83 | } |
84 | |
85 | # vim:ts=4 sw=4: |