Gentoo Archives: gentoo-commits

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.logrotate-r1 acct.initd acct.initd-r1
Date: Wed, 26 Jan 2011 05:36:35
Message-Id: 20110126053622.A654420054@flycatcher.gentoo.org
1 jer 11/01/26 05:36:22
2
3 Modified: acct.logrotate acct.initd
4 Added: acct.logrotate-r1 acct.initd-r1
5 Log:
6 Make logrotate script compatible with both baselayout 1 and 2, by Eugeny Shkrigunov (bug #351428), patches by Robert Trace.
7
8 (Portage version: 2.2.0_alpha19/cvs/Linux i686)
9
10 Revision Changes Path
11 1.4 sys-process/acct/files/acct.logrotate
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.logrotate?rev=1.4&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.logrotate?rev=1.4&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.logrotate?r1=1.3&r2=1.4
16
17 Index: acct.logrotate
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-process/acct/files/acct.logrotate,v
20 retrieving revision 1.3
21 retrieving revision 1.4
22 diff -u -r1.3 -r1.4
23 --- acct.logrotate 15 Nov 2010 15:00:59 -0000 1.3
24 +++ acct.logrotate 26 Jan 2011 05:36:22 -0000 1.4
25 @@ -1,11 +1,6 @@
26 # Logrotate file for acct
27
28 /var/account/pacct {
29 - prerotate
30 - if [ -h /lib/rc/init.d/started/acct ]; then
31 - /etc/init.d/acct stop > /dev/null 2>&1 || true
32 - fi
33 - endscript
34 compress
35 delaycompress
36 notifempty
37 @@ -14,8 +9,6 @@
38 create 0600 root root
39 missingok
40 postrotate
41 - if [ -h /lib/rc/init.d/started/acct ]; then
42 - /etc/init.d/acct start > /dev/null 2>&1 || true
43 - fi
44 + /etc/init.d/acct reload > /dev/null 2>&1
45 endscript
46 }
47
48
49
50 1.2 sys-process/acct/files/acct.initd
51
52 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.initd?rev=1.2&view=markup
53 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.initd?rev=1.2&content-type=text/plain
54 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.initd?r1=1.1&r2=1.2
55
56 Index: acct.initd
57 ===================================================================
58 RCS file: /var/cvsroot/gentoo-x86/sys-process/acct/files/acct.initd,v
59 retrieving revision 1.1
60 retrieving revision 1.2
61 diff -u -r1.1 -r1.2
62 --- acct.initd 28 Apr 2010 19:32:40 -0000 1.1
63 +++ acct.initd 26 Jan 2011 05:36:22 -0000 1.2
64 @@ -1,9 +1,9 @@
65 #!/sbin/runscript
66 -# Copyright 1999-2009 Gentoo Foundation
67 +# Copyright 1999-2011 Gentoo Foundation
68 # Distributed under the terms of the GNU General Public License v2
69 -# $Header: /var/cvsroot/gentoo-x86/sys-process/acct/files/acct.initd,v 1.1 2010/04/28 19:32:40 jer Exp $
70 +# $Header: /var/cvsroot/gentoo-x86/sys-process/acct/files/acct.initd,v 1.2 2011/01/26 05:36:22 jer Exp $
71
72 -opts="report"
73 +opts="report reload"
74
75 depend() {
76 need localmount
77 @@ -36,4 +36,10 @@
78 sa ${REPORT_OPTS} "${ACCT_LOG}"
79 }
80
81 +reload() {
82 + service_started "${SVCNAME}" || return
83 + svc_stop
84 + svc_start
85 +}
86 +
87 # vim:ts=4 sw=4:
88
89
90
91 1.1 sys-process/acct/files/acct.logrotate-r1
92
93 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.logrotate-r1?rev=1.1&view=markup
94 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.logrotate-r1?rev=1.1&content-type=text/plain
95
96 Index: acct.logrotate-r1
97 ===================================================================
98 # Logrotate file for acct
99
100 /var/account/pacct {
101 compress
102 delaycompress
103 notifempty
104 daily
105 rotate 31
106 create 0600 root root
107 missingok
108 postrotate
109 /etc/init.d/acct reload > /dev/null 2>&1
110 endscript
111 }
112
113
114
115 1.1 sys-process/acct/files/acct.initd-r1
116
117 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.initd-r1?rev=1.1&view=markup
118 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.initd-r1?rev=1.1&content-type=text/plain
119
120 Index: acct.initd-r1
121 ===================================================================
122 #!/sbin/runscript
123 # Copyright 1999-2011 Gentoo Foundation
124 # Distributed under the terms of the GNU General Public License v2
125 # $Header: /var/cvsroot/gentoo-x86/sys-process/acct/files/acct.initd-r1,v 1.1 2011/01/26 05:36:22 jer Exp $
126
127 opts="report reload"
128
129 depend() {
130 need localmount
131 }
132
133 checkconfig() {
134 export ACCT_LOG=${ACCT_LOG:-/var/account/pacct}
135 if [[ ! -e ${ACCT_LOG} ]] ; then
136 touch "${ACCT_LOG}"
137 chmod 600 "${ACCT_LOG}"
138 fi
139 return 0
140 }
141
142 start() {
143 checkconfig || return 1
144
145 ebegin "Starting accounting"
146 accton "${ACCT_LOG}"
147 eend $?
148 }
149
150 stop() {
151 ebegin "Stopping accounting"
152 accton off
153 eend $?
154 }
155
156 report() {
157 sa ${REPORT_OPTS} "${ACCT_LOG}"
158 }
159
160 reload() {
161 service_started "${SVCNAME}" || return
162 svc_stop
163 svc_start
164 }
165
166 # vim:ts=4 sw=4: