summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klausmann <klausman@gentoo.org>2012-04-29 10:32:15 +0000
committerTobias Klausmann <klausman@gentoo.org>2012-04-29 10:32:15 +0000
commit94587b48c414fc4dd80e559bf27e20ab62391b61 (patch)
tree6359d9509ff19ceaaf20cd555c90b64378573c39 /net-analyzer/smokeping/files
parentVersion bump. (diff)
downloadgentoo-2-94587b48c414fc4dd80e559bf27e20ab62391b61.tar.gz
gentoo-2-94587b48c414fc4dd80e559bf27e20ab62391b61.tar.bz2
gentoo-2-94587b48c414fc4dd80e559bf27e20ab62391b61.zip
Fix init script to not trigger warnings with newer OpenRC. Also simplify dump and restore commands (OpenRC will do these checks for us now).
(Portage version: 2.1.10.57/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/smokeping/files')
-rw-r--r--net-analyzer/smokeping/files/smokeping.init.213
1 files changed, 3 insertions, 10 deletions
diff --git a/net-analyzer/smokeping/files/smokeping.init.2 b/net-analyzer/smokeping/files/smokeping.init.2
index 068f33ff25ce..b174cfbe50f4 100644
--- a/net-analyzer/smokeping/files/smokeping.init.2
+++ b/net-analyzer/smokeping/files/smokeping.init.2
@@ -1,8 +1,9 @@
#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-opts="${opts} dump reload restore"
+extra_started_commands="reload"
+extra_stopped_commands="dump restore"
depend() {
need net
@@ -48,10 +49,6 @@ reload() {
dump() {
ebegin "Dumping smokeping rrd files to XML for backup or upgrade use"
- if service_started "${myservice}" ; then
- eerror "You need to stop smokeping before dumping files!"
- return 1
- fi
for f in `find /var/lib/smokeping -name '*.rrd' -print` ; do
f_xml=`dirname $f`/`basename $f .rrd`.xml
rrdtool dump "$f" > "${f_xml}"
@@ -62,10 +59,6 @@ dump() {
restore() {
ebegin "Restoring smokeping rrd files from XML dump files"
- if service_started "${myservice}" ; then
- eerror "You need to stop smokeping before restoring files!"
- return 1
- fi
for f in `find /var/lib/smokeping -name '*.xml' -print` ; do
f_rrd=`dirname $f`/`basename $f .xml`.rrd
mv -f "${f_rrd}" "${f_rrd}.bak"