Sorry, committed the wrong files.

This commit is contained in:
Dag-Erling Smørgrav 2010-12-02 10:47:09 +00:00
parent 30d0646401
commit c2ed8bef86
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=265567
4 changed files with 28 additions and 6 deletions

View file

@ -0,0 +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
@@ -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.'
done
}

View file

@ -0,0 +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
@@ -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.'
done
}

View file

@ -51,14 +51,14 @@ delete_crontab_entries() {
delnewsyslog() {
tmp="/etc/#munin-node$$"
sed -e '/^\/var\/log\/munin\/munin-node.log[ ]/d' /etc/newsyslog.conf >${tmp}
sed -e '/^\/var\/log\/munin-node.log[ ]/d' /etc/newsyslog.conf >${tmp}
cat ${tmp} > /etc/newsyslog.conf
rm ${tmp}
}
newsyslog() {
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'
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'
if [ -z "$ENTRY" ]; then
exit 0
elif [ "$ENTRY" = "$DEFAULT" ]; then

View file

@ -66,18 +66,18 @@ EOT
newsyslog() {
if yesno "Would you like me to set up log rotation" y; then
if grep -q /var/log/munin/munin-node.log /etc/newsyslog.conf; then
if grep -q /var/log/munin-node.log /etc/newsyslog.conf; then
:
else
cat >> /etc/newsyslog.conf <<EOT
/var/log/munin/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid
/var/log/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid
EOT
fi
if [ -f ${PKG_PREFIX}/bin/munin-node-revive ]; then
create_crontab_entries '4 * * * *' ${PKG_PREFIX}/bin/munin-node-revive
fi
else
echo "/var/log/munin/munin-node.log will grow without bounds."
echo "/var/log/munin-node.log will grow without bounds."
fi
}