diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/smokeping/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/smokeping/files')
-rw-r--r-- | net-analyzer/smokeping/files/79_smokeping.conf | 15 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch | 11 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping.conf | 1 | ||||
-rwxr-xr-x | net-analyzer/smokeping/files/smokeping.init.3 | 77 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping.init.4 | 75 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping.service | 10 |
6 files changed, 189 insertions, 0 deletions
diff --git a/net-analyzer/smokeping/files/79_smokeping.conf b/net-analyzer/smokeping/files/79_smokeping.conf new file mode 100644 index 000000000000..1e9361ba501a --- /dev/null +++ b/net-analyzer/smokeping/files/79_smokeping.conf @@ -0,0 +1,15 @@ +### +### Setup the smokeping image cache and perl cgi script +### +<IfModule mod_alias.c> + Alias "/.simg/" "/var/lib/smokeping/.simg/" + <IfModule mod_perl.c> + <Directory "/var/lib/smokeping/.simg/"> + Options -Indexes MultiViews + AllowOverride None + Order deny,allow + Deny from all + Allow from 127.0.0.1 + </Directory> + </IfModule> +</IfModule> diff --git a/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch b/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch new file mode 100644 index 000000000000..81a1e053b4f8 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch @@ -0,0 +1,11 @@ +--- a/lib/Smokeping.pm ++++ b/lib/Smokeping.pm +@@ -2631,7 +2631,7 @@ + The base directory where SmokePing keeps the files related to the DYNAMIC function. + This directory must be writeable by the WWW server. It is also used for temporary + storage of slave polling results by the master in +-L<the master/slave mode|smokeping_master_slave>. ++L<the masterE<sol>slave mode|smokeping_master_slave>. + + If this variable is not specified, the value of C<datadir> will be used instead. + DOC diff --git a/net-analyzer/smokeping/files/smokeping.conf b/net-analyzer/smokeping/files/smokeping.conf new file mode 100644 index 000000000000..729726316fbd --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.conf @@ -0,0 +1 @@ +d /run/smokeping 0755 root root diff --git a/net-analyzer/smokeping/files/smokeping.init.3 b/net-analyzer/smokeping/files/smokeping.init.3 new file mode 100755 index 000000000000..4a477ac4947f --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.init.3 @@ -0,0 +1,77 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="${opts} dump reload restore" + +depend() { + need net + use dns +} + +checkconfig() { + if [ ! -f "/etc/smokeping/config" ] ; then + eerror "You need /etc/smokeping/config to run smokeping!" + return 1 + fi +} + +start() { + checkconfig || return 1 + + if [ ! -d /run/smokeping/ ]; then + mkdir /run/smokeping/ + fi + chown smokeping:smokeping /run/smokeping/ + + ebegin "Starting smokeping" + LC_ALL=C \ + start-stop-daemon --start --name smokeping \ + --pidfile /run/smokeping/smokeping.pid \ + --exec /usr/bin/smokeping \ + --user smokeping:smokeping + eend $? +} + +stop() { + ebegin "Stopping smokeping" + start-stop-daemon --stop \ + --pidfile /run/smokeping/smokeping.pid + eend $? +} + +reload() { + ebegin "Reloading smokeping" + /usr/bin/smokeping --reload 1>/dev/null 2>&1 + eend $? +} + +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}" + chown root:0 "${f_xml}" + done + eend $? +} + +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" + chown root:0 "${f_rrd}.bak" + rrdtool restore "$f" "${f_rrd}" + chown smokeping:smokeping "${f_rrd}" + done + eend $? +} diff --git a/net-analyzer/smokeping/files/smokeping.init.4 b/net-analyzer/smokeping/files/smokeping.init.4 new file mode 100644 index 000000000000..255e9960eee1 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.init.4 @@ -0,0 +1,75 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="${opts} dump reload restore" + +depend() { + need net + use dns +} + +checkconfig() { + if [ ! -f "/etc/smokeping/config" ] ; then + eerror "You need /etc/smokeping/config to run smokeping!" + return 1 + fi +} + +start() { + checkconfig || return 1 + + checkpath -d -m 0755 -o smokeping:smokeping /run/smokeping + checkpath -d -m 0755 -o smokeping:smokeping /var/cache/smokeping + + ebegin "Starting smokeping" + LC_ALL=C \ + start-stop-daemon --start --name smokeping \ + --pidfile /run/smokeping/smokeping.pid \ + --exec /usr/bin/smokeping \ + --user smokeping:smokeping + eend $? +} + +stop() { + ebegin "Stopping smokeping" + start-stop-daemon --stop \ + --pidfile /run/smokeping/smokeping.pid + eend $? +} + +reload() { + ebegin "Reloading smokeping" + /usr/bin/smokeping --reload 1>/dev/null 2>&1 + eend $? +} + +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}" + chown root:0 "${f_xml}" + done + eend $? +} + +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" + chown root:0 "${f_rrd}.bak" + rrdtool restore "$f" "${f_rrd}" + chown smokeping:smokeping "${f_rrd}" + done + eend $? +} diff --git a/net-analyzer/smokeping/files/smokeping.service b/net-analyzer/smokeping/files/smokeping.service new file mode 100644 index 000000000000..2130aca23627 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.service @@ -0,0 +1,10 @@ +[Unit] +Description=Latency Logging and Graphing System +After=network.target + +[Service] +ExecStart=/usr/bin/smokeping --nodaemon +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target |