summaryrefslogtreecommitdiff
path: root/sysutils/munin-node/files
diff options
context:
space:
mode:
authorFlorian Smeets <flo@FreeBSD.org>2012-09-13 22:00:33 +0000
committerFlorian Smeets <flo@FreeBSD.org>2012-09-13 22:00:33 +0000
commit8b61b2876cc5407f25f6d9cd5d8bebe397a60668 (patch)
treefafd474ebc08428c29c584a1087331befe40abec /sysutils/munin-node/files
parent- update japanese/eb to 4.4.3 (diff)
- Update to 2.0.6 based on [1]
- Add support for ada disk devices to hddtemp_smartctl [2] - Add a patch for upstream bug 1251 to prevent huge munin-graph.log files PR: ports/171116 [1] PR: ports/169287 [2] Submitted by: mm [1], TAKEMON Takashi <takemon@bamboogate.co.jp> [2]
Notes
Notes: svn path=/head/; revision=304233
Diffstat (limited to 'sysutils/munin-node/files')
-rw-r--r--sysutils/munin-node/files/munin-sched.in27
-rw-r--r--sysutils/munin-node/files/patch-Makefile14
-rw-r--r--sysutils/munin-node/files/patch-Makefile.config14
-rw-r--r--sysutils/munin-node/files/patch-node-node.d.freebsd-dev_cpu_.diff11
-rw-r--r--sysutils/munin-node/files/patch-node__sbin__munin-node11
-rw-r--r--sysutils/munin-node/files/patch-plugins__node.d.freebsd__iostat.in16
-rw-r--r--sysutils/munin-node/files/patch-plugins__node.d__colour_tester.in11
-rw-r--r--sysutils/munin-node/files/patch-plugins__node.d__hddtemp_smartctl.in11
-rw-r--r--sysutils/munin-node/files/patch-plugins__node.d__squeezebox_.in20
9 files changed, 71 insertions, 64 deletions
diff --git a/sysutils/munin-node/files/munin-sched.in b/sysutils/munin-node/files/munin-sched.in
new file mode 100644
index 000000000000..da980abf8e0e
--- /dev/null
+++ b/sysutils/munin-node/files/munin-sched.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+
+# PROVIDE: munin-sched
+# REQUIRE: DAEMON
+# BEFORE: cron
+
+#
+# Add the following lines to /etc/rc.conf to enable munin-sched:
+# munin_sched_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable munin-sched
+# munin_sched_config (path): Set to "%%PREFIX%%/etc/munin/munin-node.conf" by default.
+#
+
+. /etc/rc.subr
+
+name="munin_sched"
+rcvar=munin_sched_enable
+
+[ -z "$munin_sched_enable" ] && munin_sched_enable="NO"
+[ -z "$munin_sched_config" ] && munin_sched_config="%%PREFIX%%/etc/munin/munin-node.conf"
+
+command="%%PREFIX%%/sbin/munin-sched"
+pidfile=`awk '$1 == "pid_file" { print $2 }' $munin_sched_config`
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/sysutils/munin-node/files/patch-Makefile b/sysutils/munin-node/files/patch-Makefile
deleted file mode 100644
index 5b502c7dadb9..000000000000
--- a/sysutils/munin-node/files/patch-Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
---- Makefile.orig 2009-12-30 05:55:56.000000000 -0700
-+++ Makefile 2010-01-30 12:57:44.000000000 -0700
-@@ -65,11 +65,8 @@
- endif
-
- install-pre: Makefile Makefile.config
-- @$(CHECKUSER)
-- mkdir -p $(LOGDIR)
- mkdir -p $(STATEDIR)
- mkdir -p $(CONFDIR)
-- $(CHOWN) $(USER) $(LOGDIR) $(STATEDIR)
-
- install-master-prime: $(INFILES_MASTER) install-pre install-master
- mkdir -p $(CONFDIR)/templates
diff --git a/sysutils/munin-node/files/patch-Makefile.config b/sysutils/munin-node/files/patch-Makefile.config
deleted file mode 100644
index 98a7052bf8ae..000000000000
--- a/sysutils/munin-node/files/patch-Makefile.config
+++ /dev/null
@@ -1,14 +0,0 @@
---- Makefile.config.orig 2009-12-30 05:55:56.000000000 -0700
-+++ Makefile.config 2010-01-30 11:17:34.000000000 -0700
-@@ -126,9 +129,8 @@
- # Which command to use to check if the USER and GROUP to run Munin as, exists.
- # These will work on most modern OSes:
- #
--GETENT := $(shell which getent || which true 2>/dev/null)
--CHECKUSER := $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
--CHECKGROUP := $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
-+CHECKUSER:= $(shell /usr/sbin/pw user show $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
-+CHECKGROUP:= $(shell /usr/sbin/pw group show $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
-
- # For OSX, comment out the previous two lines and comment in these
- #
diff --git a/sysutils/munin-node/files/patch-node-node.d.freebsd-dev_cpu_.diff b/sysutils/munin-node/files/patch-node-node.d.freebsd-dev_cpu_.diff
deleted file mode 100644
index 34ed23fb9217..000000000000
--- a/sysutils/munin-node/files/patch-node-node.d.freebsd-dev_cpu_.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./plugins/node.d.freebsd/dev_cpu_.in.orig 2011-02-15 00:02:38.000000000 +0100
-+++ ./plugins/node.d.freebsd/dev_cpu_.in 2011-02-15 00:03:19.000000000 +0100
-@@ -109,7 +109,7 @@
- reqcpus
- for cpu in $cpus ; do
- echo -n "CPU$cpu.value "
-- sysctl -n "dev.cpu.$cpu.$func"
-+ sysctl -n "dev.cpu.$cpu.$func" | tr -d 'C'
- done
- }
-
diff --git a/sysutils/munin-node/files/patch-node__sbin__munin-node b/sysutils/munin-node/files/patch-node__sbin__munin-node
index 75a1cb707116..792c9a645408 100644
--- a/sysutils/munin-node/files/patch-node__sbin__munin-node
+++ b/sysutils/munin-node/files/patch-node__sbin__munin-node
@@ -1,6 +1,6 @@
---- node/sbin/munin-node.orig Wed Oct 20 14:51:29 2010
-+++ node/sbin/munin-node Wed Oct 20 14:52:34 2010
-@@ -56,6 +56,9 @@ sub main {
+--- node/sbin/munin-node.orig 2012-07-24 12:45:57.000000000 +0200
++++ node/sbin/munin-node 2012-07-30 11:30:49.735734436 +0200
+@@ -53,8 +53,11 @@
$ENV{$key} =~ /^(.*)$/;
$ENV{$key} = $1;
}
@@ -8,5 +8,8 @@
+ # must not contain writable directories.
+ $ENV{PATH}='/bin:/sbin:/usr/bin:/usr/sbin:%%PREFIX%%/bin:%%PREFIX%%/sbin';
- $0 =~ /^(.*)$/;
+- $0 =~ /([^\/]*)$/;
++ $0 =~ /^(.*)$/;
$0 = $1;
+
+ parse_args();
diff --git a/sysutils/munin-node/files/patch-plugins__node.d.freebsd__iostat.in b/sysutils/munin-node/files/patch-plugins__node.d.freebsd__iostat.in
new file mode 100644
index 000000000000..b63336f3243a
--- /dev/null
+++ b/sysutils/munin-node/files/patch-plugins__node.d.freebsd__iostat.in
@@ -0,0 +1,16 @@
+--- ./plugins/node.d.freebsd/iostat.in.orig 2012-07-11 14:14:27.841196443 +0200
++++ ./plugins/node.d.freebsd/iostat.in 2012-07-11 14:14:32.619552027 +0200
+@@ -56,13 +56,11 @@
+ for d in $drives; do
+ echo "${d}_read.label ${d}"
+ echo "${d}_read.type DERIVE"
+- echo "${d}_read.max 2000"
+ echo "${d}_read.min 0"
+ echo "${d}_read.graph no"
+ echo "${d}_write.label ${d}"
+ echo "${d}_write.info I/O on device ${d}"
+ echo "${d}_write.type DERIVE"
+- echo "${d}_write.max 2000"
+ echo "${d}_write.min 0"
+ echo "${d}_write.negative ${d}_read"
+ done
diff --git a/sysutils/munin-node/files/patch-plugins__node.d__colour_tester.in b/sysutils/munin-node/files/patch-plugins__node.d__colour_tester.in
deleted file mode 100644
index 9b6eac4b4b65..000000000000
--- a/sysutils/munin-node/files/patch-plugins__node.d__colour_tester.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./plugins/node.d/colour_tester.in.orig 2010-03-09 22:23:28.000000000 +0100
-+++ ./plugins/node.d/colour_tester.in 2010-03-09 22:23:46.000000000 +0100
-@@ -29,7 +29,7 @@ NUMCOL=$(($I - 1))
-
-
- do_ () { # Fetch
-- for I in $(seq 1 $NUMCOL); do
-+ for I in $(jot - 1 $NUMCOL); do
- echo "l$I.value $I"
- done
- }
diff --git a/sysutils/munin-node/files/patch-plugins__node.d__hddtemp_smartctl.in b/sysutils/munin-node/files/patch-plugins__node.d__hddtemp_smartctl.in
new file mode 100644
index 000000000000..ca6daea50fd7
--- /dev/null
+++ b/sysutils/munin-node/files/patch-plugins__node.d__hddtemp_smartctl.in
@@ -0,0 +1,11 @@
+--- plugins/node.d/hddtemp_smartctl.in.orig 2012-09-11 11:26:15.928249255 +0200
++++ plugins/node.d/hddtemp_smartctl.in 2012-09-11 11:26:48.947249274 +0200
+@@ -151,7 +151,7 @@
+ # without probing them.
+ } elsif ($^O eq 'freebsd') {
+ opendir(DEV, '/dev');
+- @drives = grep /^ad[0-9]+$/, readdir DEV;
++ @drives = grep /^ad[0-9]+$|^ada[0-9]+$/, readdir DEV;
+ closedir(DEV);
+ } elsif ($^O eq 'solaris') {
+ @drives = map { s@.*/@@ ; $_ } glob '/dev/rdsk/c*t*d*s2';
diff --git a/sysutils/munin-node/files/patch-plugins__node.d__squeezebox_.in b/sysutils/munin-node/files/patch-plugins__node.d__squeezebox_.in
index 24f2893aaf4e..afc73b8fd4f5 100644
--- a/sysutils/munin-node/files/patch-plugins__node.d__squeezebox_.in
+++ b/sysutils/munin-node/files/patch-plugins__node.d__squeezebox_.in
@@ -1,24 +1,24 @@
---- ./plugins/node.d/squeezebox_.in.orig 2010-03-09 22:23:57.000000000 +0100
-+++ ./plugins/node.d/squeezebox_.in 2010-03-09 22:24:16.000000000 +0100
-@@ -157,7 +157,7 @@ if [ "$CMD" = "years" ]; then
- # echo "graph_order y0"
- echo -n "graph_order y"; echo $years_array | sed 's/ / y/g'
+--- ./plugins/node.d/squeezebox_.in.orig 2012-08-14 17:19:40.000000000 +0200
++++ ./plugins/node.d/squeezebox_.in 2012-08-27 13:55:40.573530762 +0200
+@@ -156,7 +156,7 @@
+ printf "graph_order y"
+ echo $years_array | sed 's/ / y/g'
- for i in `seq 0 $no_of_years`; do
+ for i in `jot - 0 $no_of_years`; do
year=$(echo ${arr1[$i]})
if [ $year = 0 ]; then
echo y0.label No year
-@@ -172,7 +172,7 @@ if [ "$CMD" = "years" ]; then
+@@ -171,7 +171,7 @@
done
exit 0
- fi
+ fi
- for i in `seq 0 $no_of_years`; do
+ for i in `jot - 0 $no_of_years`; do
year=$(echo ${arr1[$i]})
- echo -n "y${year}.value "
+ printf "y%s.value " ${year}
printf "%b" "albums 0 0 year:${year}\nexit\n" | $NC $HOST $PORT | sed 's/%3A/:/g' | cut -d ':' -f 3
-@@ -183,7 +183,7 @@ elif [ "$CMD" = "signalstrength" -o "$CM
+@@ -182,7 +182,7 @@
echo "graph_category Squeezebox"
COUNT=$(printf "%b" "player count ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 3)
(( COUNT-- ))
@@ -27,7 +27,7 @@
MAC=$(printf "%b" "player id $ID ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 4 | sed 's/%3A/:/g')
NAME=$(printf "%b" "player name $MAC ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 4 | sed 's/%20/ /g')
MAC2=$(echo $MAC | sed 's/://g; s/\./_/g')
-@@ -193,7 +193,7 @@ elif [ "$CMD" = "signalstrength" -o "$CM
+@@ -192,7 +192,7 @@
fi
COUNT=$(printf "%b" "player count ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 3)
(( COUNT-- ))