From: | "Mike Frysinger (vapier)" <vapier@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-apps/collectl/files: collectl.initd |
Date: | Fri, 08 Jan 2010 12:42:27 |
Message-Id: | E1NTEAa-0008SY-Rj@stork.gentoo.org |
1 | vapier 10/01/08 12:42:24 |
2 | |
3 | Modified: collectl.initd |
4 | Log: |
5 | Add a "flush" init.d operation #292864#18 by Mark Seger. |
6 | (Portage version: 2.2_rc61/cvs/Linux x86_64) |
7 | |
8 | Revision Changes Path |
9 | 1.3 sys-apps/collectl/files/collectl.initd |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/collectl/files/collectl.initd?rev=1.3&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/collectl/files/collectl.initd?rev=1.3&content-type=text/plain |
13 | diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/collectl/files/collectl.initd?r1=1.2&r2=1.3 |
14 | |
15 | Index: collectl.initd |
16 | =================================================================== |
17 | RCS file: /var/cvsroot/gentoo-x86/sys-apps/collectl/files/collectl.initd,v |
18 | retrieving revision 1.2 |
19 | retrieving revision 1.3 |
20 | diff -u -r1.2 -r1.3 |
21 | --- collectl.initd 15 Nov 2009 01:29:22 -0000 1.2 |
22 | +++ collectl.initd 8 Jan 2010 12:42:24 -0000 1.3 |
23 | @@ -1,19 +1,29 @@ |
24 | #!/sbin/runscript |
25 | # Copyright 1999-2007 Gentoo Foundation |
26 | # Distributed under the terms of the GNU General Public License v2 |
27 | -# $Header: /var/cvsroot/gentoo-x86/sys-apps/collectl/files/collectl.initd,v 1.2 2009/11/15 01:29:22 vapier Exp $ |
28 | +# $Header: /var/cvsroot/gentoo-x86/sys-apps/collectl/files/collectl.initd,v 1.3 2010/01/08 12:42:24 vapier Exp $ |
29 | + |
30 | +opts="flush" |
31 | + |
32 | +pidfile="/var/run/collectl.pid" |
33 | |
34 | start() { |
35 | ebegin "Starting collectl" |
36 | start-stop-daemon \ |
37 | --start \ |
38 | - --pidfile /var/run/collectl.pid \ |
39 | + --pidfile ${pidfile} \ |
40 | --exec /usr/bin/collectl -- -D |
41 | eend $? |
42 | } |
43 | |
44 | stop() { |
45 | ebegin "Stopping collectl" |
46 | - start-stop-daemon --stop --pidfile /var/run/collectl.pid |
47 | + start-stop-daemon --stop --pidfile ${pidfile} |
48 | + eend $? |
49 | +} |
50 | + |
51 | +flush() { |
52 | + einfo "Flushing collectl buffers" |
53 | + start-stop-daemon --oknodo --stop --signal USR1 --pidfile ${pidfile} |
54 | eend $? |
55 | } |