summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-01-08 12:42:25 +0000
committerMike Frysinger <vapier@gentoo.org>2010-01-08 12:42:25 +0000
commit75f003708b3e06005c8b0099c2854baf3ec09f6c (patch)
tree9ece92225ab07850addbbf2dc349296de6d79862 /sys-apps/collectl
parentamd64 stable wrt #297531 (diff)
downloadgentoo-2-75f003708b3e06005c8b0099c2854baf3ec09f6c.tar.gz
gentoo-2-75f003708b3e06005c8b0099c2854baf3ec09f6c.tar.bz2
gentoo-2-75f003708b3e06005c8b0099c2854baf3ec09f6c.zip
Add a "flush" init.d operation #292864#18 by Mark Seger.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/collectl')
-rw-r--r--sys-apps/collectl/ChangeLog5
-rwxr-xr-xsys-apps/collectl/files/collectl.initd16
2 files changed, 17 insertions, 4 deletions
diff --git a/sys-apps/collectl/ChangeLog b/sys-apps/collectl/ChangeLog
index d6515be8d19b..4709c95a81cf 100644
--- a/sys-apps/collectl/ChangeLog
+++ b/sys-apps/collectl/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-apps/collectl
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/collectl/ChangeLog,v 1.8 2010/01/08 02:30:29 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/collectl/ChangeLog,v 1.9 2010/01/08 12:42:25 vapier Exp $
+
+ 08 Jan 2010; Mike Frysinger <vapier@gentoo.org> files/collectl.initd:
+ Add a "flush" init.d operation #292864#18 by Mark Seger.
*collectl-3.4.0 (08 Jan 2010)
diff --git a/sys-apps/collectl/files/collectl.initd b/sys-apps/collectl/files/collectl.initd
index 99b0290a327c..c55f14a221bb 100755
--- a/sys-apps/collectl/files/collectl.initd
+++ b/sys-apps/collectl/files/collectl.initd
@@ -1,19 +1,29 @@
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/collectl/files/collectl.initd,v 1.2 2009/11/15 01:29:22 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/collectl/files/collectl.initd,v 1.3 2010/01/08 12:42:24 vapier Exp $
+
+opts="flush"
+
+pidfile="/var/run/collectl.pid"
start() {
ebegin "Starting collectl"
start-stop-daemon \
--start \
- --pidfile /var/run/collectl.pid \
+ --pidfile ${pidfile} \
--exec /usr/bin/collectl -- -D
eend $?
}
stop() {
ebegin "Stopping collectl"
- start-stop-daemon --stop --pidfile /var/run/collectl.pid
+ start-stop-daemon --stop --pidfile ${pidfile}
+ eend $?
+}
+
+flush() {
+ einfo "Flushing collectl buffers"
+ start-stop-daemon --oknodo --stop --signal USR1 --pidfile ${pidfile}
eend $?
}