mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 09:19:15 -04:00
- fix newsyslog entries, logs have been living in /var/log/munin for some
time now [1] - fix http_loadtime plugin [2] - fix coretemp and dev_cpu plugins [3] PR: ports/151182 [1], ports/154688 [2], ports/154584 [3] Submitted by: Detlef Peeters <dp@heringa.de> [1] Oliver Brandmueler <ob@e-gitt.net> [2] Hiroki (REO) Kashiwazaki <reo@iic.hokudai.ac.jp> [3]
This commit is contained in:
parent
2c9fdd98a1
commit
02c771df45
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=269165
6 changed files with 23 additions and 12 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= munin
|
||||
PORTVERSION= 1.4.5
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= sysutils perl5
|
||||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20stable/${PORTVERSION}
|
||||
PKGNAMESUFFIX= -node
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- plugins/node.d.freebsd/coretemp.in.orig 2009-04-01 14:24:27.000000000 +0200
|
||||
+++ plugins/node.d.freebsd/coretemp.in 2010-12-02 11:21:05.512573734 +0100
|
||||
--- ./plugins/node.d.freebsd/coretemp.in.orig 2011-02-14 23:51:14.000000000 +0100
|
||||
+++ ./plugins/node.d.freebsd/coretemp.in 2011-02-14 23:52:10.000000000 +0100
|
||||
@@ -75,7 +75,7 @@
|
||||
reqcpus
|
||||
for cpu in $cpus ; do
|
||||
echo -n "CPU$cpu.value "
|
||||
- sysctl -n dev.cpu.$cpu.temperature
|
||||
+ sysctl -n dev.cpu.$cpu.temperature | tr -cd '0-9.'
|
||||
+ sysctl -n dev.cpu.$cpu.temperature | tr -d 'C'
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- plugins/node.d.freebsd/dev_cpu_.in.orig 2009-09-16 12:04:17.000000000 +0200
|
||||
+++ plugins/node.d.freebsd/dev_cpu_.in 2010-12-02 11:22:28.183558536 +0100
|
||||
--- ./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 -cd '0-9.'
|
||||
+ sysctl -n "dev.cpu.$cpu.$func" | tr -d 'C'
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- ./plugins/node.d/http_loadtime.in.orig 2011-02-14 23:59:36.000000000 +0100
|
||||
+++ ./plugins/node.d/http_loadtime.in 2011-02-14 23:59:56.000000000 +0100
|
||||
@@ -55,7 +55,7 @@
|
||||
exit 0
|
||||
fi
|
||||
|
||||
-TMPDIR=`mktemp -d` || exit 1
|
||||
+TMPDIR=`mktemp -d /tmp/munin.http_loadtime.XXXXXX` || exit 1
|
||||
|
||||
trap "rm -rf $TMPDIR" EXIT
|
||||
|
|
@ -51,14 +51,14 @@ delete_crontab_entries() {
|
|||
|
||||
delnewsyslog() {
|
||||
tmp="/etc/#munin-node$$"
|
||||
sed -e '/^\/var\/log\/munin-node.log[ ]/d' /etc/newsyslog.conf >${tmp}
|
||||
sed -e '/^\/var\/log\/munin\/munin-node.log[ ]/d' /etc/newsyslog.conf >${tmp}
|
||||
cat ${tmp} > /etc/newsyslog.conf
|
||||
rm ${tmp}
|
||||
}
|
||||
|
||||
newsyslog() {
|
||||
ENTRY=`grep /var/log/munin-node.log /etc/newsyslog.conf`
|
||||
DEFAULT='/var/log/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid'
|
||||
ENTRY=`grep /var/log/munin/munin-node.log /etc/newsyslog.conf`
|
||||
DEFAULT='/var/log/munin/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid'
|
||||
if [ -z "$ENTRY" ]; then
|
||||
exit 0
|
||||
elif [ "$ENTRY" = "$DEFAULT" ]; then
|
||||
|
|
|
@ -66,11 +66,11 @@ EOT
|
|||
|
||||
newsyslog() {
|
||||
if yesno "Would you like me to set up log rotation" y; then
|
||||
if grep -q /var/log/munin-node.log /etc/newsyslog.conf; then
|
||||
if grep -q /var/log/munin/munin-node.log /etc/newsyslog.conf; then
|
||||
:
|
||||
else
|
||||
cat >> /etc/newsyslog.conf <<EOT
|
||||
/var/log/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid
|
||||
/var/log/munin/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid
|
||||
EOT
|
||||
fi
|
||||
if [ -f ${PKG_PREFIX}/bin/munin-node-revive ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue