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/mrtg/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/mrtg/files')
-rw-r--r-- | net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch | 11 | ||||
-rw-r--r-- | net-analyzer/mrtg/files/mrtg.confd | 17 | ||||
-rw-r--r-- | net-analyzer/mrtg/files/mrtg.rc | 54 |
3 files changed, 82 insertions, 0 deletions
diff --git a/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch b/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch new file mode 100644 index 000000000000..5540874d9a00 --- /dev/null +++ b/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch @@ -0,0 +1,11 @@ +--- a/bin/mrtg ++++ b/bin/mrtg +@@ -300,7 +300,7 @@ sub main { + if ($cfg{enableipv6} eq 'yes') { + if ( eval {local $SIG{__DIE__};require Socket; require Socket6; require IO::Socket::INET6;}) { + import Socket; +- import Socket6; ++ Socket6->import(qw(inet_pton getaddrinfo)); + debug('base', "IPv6 libraries found, IPv6 enabled."); + } else { + warn "$NOW: WARNING: IPv6 libraries not found, IPv6 disabled.\n"; diff --git a/net-analyzer/mrtg/files/mrtg.confd b/net-analyzer/mrtg/files/mrtg.confd new file mode 100644 index 000000000000..c0fb422b11ec --- /dev/null +++ b/net-analyzer/mrtg/files/mrtg.confd @@ -0,0 +1,17 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +MRTG_CONF="/etc/mrtg.conf" +MRTG_PID="/var/run/mrtg.pid" + +# uncomment and set the following, if you'd like to run mrtg as a +# different user/group +#MRTG_USER="" +#MRTG_GROUP="" + +# uncomment if you'd like to enable logging +#MRTG_LOG="/var/log/mrtg.log" + +# set any extra options here +MRTG_OPTS="" diff --git a/net-analyzer/mrtg/files/mrtg.rc b/net-analyzer/mrtg/files/mrtg.rc new file mode 100644 index 000000000000..deb3229a543a --- /dev/null +++ b/net-analyzer/mrtg/files/mrtg.rc @@ -0,0 +1,54 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net + + # if monitoring snmp variables on this machine: + # use net-snmpd +} + +checkconfig() { + if [[ ! -f ${MRTG_CONF} ]] ; then + eerror "Please create ${MRTG_CONF} (try man cfgmaker)" + return 1 + fi + + mrtg --check ${MRTG_CONF} + return $? +} + +start() { + # mrtg will not run if LANG=*utf8 + # use grep instead of bash regexp for bug #159786 + [[ "$(echo $LANG|grep -E '((^[A-Za-z0-9\_\@\-]+\.)|(^))([uU][tT][fF]-?8)$')" ]] \ + && LANG='C' + + checkconfig || return $? + + # enable logging? + [[ -n "${MRTG_LOG}" ]] && \ + MRTG_OPTS="${MRTG_OPTS} --logging ${MRTG_LOG}" + + # run as a different user? + [[ -n "${MRTG_USER}" ]] && \ + MRTG_OPTS="${MRTG_OPTS} --user ${MRTG_USER}" + + # run as a different group? + [[ -n "${MRTG_GROUP}" ]] && \ + MRTG_OPTS="${MRTG_OPTS} --group ${MRTG_GROUP}" + + ebegin "Starting mrtg" + start-stop-daemon --start --quiet --pidfile ${MRTG_PID} --name mrtg\ + --exec /usr/bin/mrtg -- --daemon --pid-file=${MRTG_PID} \ + ${MRTG_OPTS} ${MRTG_CONF} >/dev/null + eend $? "Failed to start mrtg" +} + +stop() { + ebegin "Stopping mrtg" + start-stop-daemon --stop --quiet --pidfile ${MRTG_PID} + eend $? "Failed to stop mrtg" +} |