FreeBSD Bugzilla – Attachment 48464 Details for
Bug 74166
Update port: sysutils/munin-node 1.0.3 -> 1.0.4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
munin-node-1.0.4.patch
munin-node-1.0.4.patch (text/plain), 9.81 KB, created by
Lupe Christoph
on 2004-11-20 16:20:31 UTC
(
hide
)
Description:
munin-node-1.0.4.patch
Filename:
MIME Type:
Creator:
Lupe Christoph
Created:
2004-11-20 16:20:31 UTC
Size:
9.81 KB
patch
obsolete
>diff -ruN ports/sysutils/munin-node-1.0.3/Makefile ports/sysutils/munin-node/Makefile >--- ports/sysutils/munin-node-1.0.3/Makefile Tue Nov 16 16:16:37 2004 >+++ ports/sysutils/munin-node/Makefile Sat Nov 20 13:48:04 2004 >@@ -6,7 +6,7 @@ > # > > PORTNAME= munin >-PORTVERSION= 1.0.3 >+PORTVERSION= 1.0.4 > CATEGORIES= sysutils perl5 > MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} > MASTER_SITE_SUBDIR= munin >@@ -32,17 +32,30 @@ > ALL_TARGET= DATADIR=${DATADIR} build build-man > INSTALL_TARGET= DATADIR=${DATADIR} install-node install-node-plugins > MAKE_ENV= LANG=C >+NOPRECIOUSMAKEVARS=yes > > MAN5= munin-node.conf.5 > MAN8= munin-node-configure.8 munin-node.8 munin-run.8 > >+.if ${OSVERSION} < 500000 >+PKGMSG=${FILESDIR}/pkg-message.4 >+STARTSTOP_SRC=${FILESDIR}/munin-node.sh >+STARTSTOP_DST=${PREFIX}/etc/rc.d/munin-node.sh >+.else >+PKGMSG=${FILESDIR}/pkg-message >+STARTSTOP_SRC=${FILESDIR}/munin_node.sh >+STARTSTOP_DST=/etc/rc.d/munin_node >+.endif >+ > pre-install: >- @${SED} 's@%%PREFIX%%@${PREFIX}@g' ${FILESDIR}/pkg-message > ${PKGMESSAGE} >+ @${SED} 's@%%PREFIX%%@${PREFIX}@g' ${PKGMSG} > ${PKGMESSAGE} > @PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL > > post-install: >- @${SED} 's@%PREFIX%@${LOCALBASE}@g' ${FILESDIR}/munin-node.sh > ${PREFIX}/etc/rc.d/munin-node.sh >- @${CHMOD} +x ${PREFIX}/etc/rc.d/munin-node.sh >+ @${SED} 's@%PREFIX%@${LOCALBASE}@g' ${STARTSTOP_SRC} > ${STARTSTOP_DST} >+ @${CHMOD} +x ${STARTSTOP_DST} >+ ${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf ${PREFIX}/etc/munin/munin-node.conf.sample >+ ${INSTALL_DATA} ${WRKSRC}/plugins.conf ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample > @if [ ! -f ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf ]; then \ > ${INSTALL_DATA} ${WRKSRC}/plugins.conf ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf; \ > fi >diff -ruN ports/sysutils/munin-node-1.0.3/distinfo ports/sysutils/munin-node/distinfo >--- ports/sysutils/munin-node-1.0.3/distinfo Thu Nov 18 06:56:53 2004 >+++ ports/sysutils/munin-node/distinfo Thu Nov 18 07:42:44 2004 >@@ -1,2 +1,2 @@ >-MD5 (munin_1.0.3.tar.gz) = 8114e4d716e0ec7ac70357a697af28cf >-SIZE (munin_1.0.3.tar.gz) = 214362 >+MD5 (munin_1.0.4.tar.gz) = 00721181e1ff81be85ad89307457d998 >+SIZE (munin_1.0.4.tar.gz) = 214902 >diff -ruN ports/sysutils/munin-node-1.0.3/files/munin-node.sh ports/sysutils/munin-node/files/munin-node.sh >--- ports/sysutils/munin-node-1.0.3/files/munin-node.sh Tue Mar 2 16:54:05 2004 >+++ ports/sysutils/munin-node/files/munin-node.sh Fri Nov 19 08:23:38 2004 >@@ -14,7 +14,13 @@ > if [ -f $CONFIG ]; then > PIDFILE=`awk '$1 == "pid_file" { print $2 }' $CONFIG` > if [ -f $PIDFILE ]; then >- /bin/kill `cat $PIDFILE` && echo -n ' munin-node' >+ PID=`cat $PIDFILE` >+ CMD=`ps -xa -o command -p $PID | sed 1d` >+ case "$CMD" in >+ *munin-node*) >+ /bin/kill $PID && echo -n ' munin-node' >+ ;; >+ esac > fi > fi > ;; >diff -ruN ports/sysutils/munin-node-1.0.3/files/munin_node.sh ports/sysutils/munin-node/files/munin_node.sh >--- ports/sysutils/munin-node-1.0.3/files/munin_node.sh Thu Jan 1 01:00:00 1970 >+++ ports/sysutils/munin-node/files/munin_node.sh Sat Nov 20 12:18:37 2004 >@@ -0,0 +1,28 @@ >+#!/bin/sh >+# >+ >+# PROVIDE: munin-node >+# REQUIRE: DAEMON >+# BEFORE: cron >+# KEYWORD: FreeBSD >+ >+# >+# Add the following lines to /etc/rc.conf to enable munin-node: >+# munin_node_enable (bool): Set to "NO" by default. >+# Set it to "YES" to enable munin-node >+# munin_node_config (path): Set to "%PREFIX%/etc/munin/munin-node.conf" by default. >+# >+ >+. /etc/rc.subr >+ >+name="munin_node" >+rcvar=`set_rcvar` >+ >+[ -z "$munin_node_enable" ] && munin_node_enable="NO" >+[ -z "$munin_node_config" ] && munin_node_config="/usr/local/etc/munin/munin-node.conf" >+ >+command="/usr/local/sbin/munin-node" >+pidfile=`awk '$1 == "pid_file" { print $2 }' $munin_node_config` >+ >+load_rc_config $name >+run_rc_command "$1" >diff -ruN ports/sysutils/munin-node-1.0.3/files/patch-cpu.in ports/sysutils/munin-node/files/patch-cpu.in >--- ports/sysutils/munin-node-1.0.3/files/patch-cpu.in Thu Jan 1 01:00:00 1970 >+++ ports/sysutils/munin-node/files/patch-cpu.in Sat Nov 20 15:33:32 2004 >@@ -0,0 +1,15 @@ >+--- munin-1.0.4.orig/node/node.d.freebsd/cpu.in Sun May 9 21:18:35 2004 >++++ munin-1.0.4/node/node.d.freebsd/cpu.in Sat Nov 20 15:32:50 2004 >+@@ -59,10 +59,10 @@ >+ OSV=`/sbin/sysctl -n kern.osrelease | cut -f1 -d.` >+ if [ "$OSV" = "4" ]; then >+ STATUNITS=`/sbin/sysctl -n kern.clockrate | cut -f16 -d' '` >+- elif [ "$OSV" = "5" ]; then >++ elif [ "$OSV" -ge "5" ]; then >+ STATUNITS=`/sbin/sysctl -n kern.clockrate | cut -f13 -d' '` >+ fi >+-# PERCENT=`/sbin/sysctl -n hw.ncpu | awk '{print ($1)*100}'` >++ PERCENT=`/sbin/sysctl -n hw.ncpu | awk '{print ($1)*100}'` >+ SCALE=`echo 'scale=5;' $PERCENT/$STATUNITS | bc -q ` >+ NCPU=`/sbin/sysctl -n hw.ncpu` >+ if [ "$scaleto100" = yes ]; then >diff -ruN ports/sysutils/munin-node-1.0.3/files/patch-vmstat.in ports/sysutils/munin-node/files/patch-vmstat.in >--- ports/sysutils/munin-node-1.0.3/files/patch-vmstat.in Thu Jan 1 01:00:00 1970 >+++ ports/sysutils/munin-node/files/patch-vmstat.in Sat Nov 20 14:16:59 2004 >@@ -0,0 +1,29 @@ >+--- munin-1.0.4.orig/node/node.d.freebsd/vmstat.in Sun Feb 1 19:59:54 2004 >++++ munin-1.0.4/node/node.d.freebsd/vmstat.in Sat Nov 20 14:14:54 2004 >+@@ -32,7 +32,7 @@ >+ OSV=`/sbin/sysctl -n kern.osrelease | cut -f1 -d.` >+ >+ if [ "$1" = "autoconf" ]; then >+- if [ "$OSV" = "5" ]; then >++ if [ "$OSV" -ge "5" ]; then >+ /sbin/sysctl -n vm.vmtotal 2>/dev/null >/dev/null >+ RESULT=$? >+ NAME=/sbin/sysctl >+@@ -59,7 +59,7 @@ >+ echo 'graph_title VMstat' >+ echo 'graph_args --base 1000 -l 0' >+ echo 'graph_vlabel process states' >+- if [ "$OSV" = "5" ]; then >++ if [ "$OSV" -ge "5" ]; then >+ echo 'running.label running' >+ echo 'running.type GAUGE' >+ echo 'diskwait.label diskwait' >+@@ -77,7 +77,7 @@ >+ exit 0 >+ fi >+ >+-if [ "$OSV" = "5" ]; then >++if [ "$OSV" -ge "5" ]; then >+ sysctl -n vm.vmtotal | awk ' >+ /^Processes:/ { >+ print "running.value", $3; >diff -ruN ports/sysutils/munin-node-1.0.3/files/pkg-message ports/sysutils/munin-node/files/pkg-message >--- ports/sysutils/munin-node-1.0.3/files/pkg-message Tue Mar 2 16:54:05 2004 >+++ ports/sysutils/munin-node/files/pkg-message Sat Nov 20 12:24:45 2004 >@@ -5,8 +5,16 @@ > > Please edit it according to your needs. > >-The Munin client will be started at system boot automatically. >-You can start it manually with: >- %%PREFIX%%/etc/rc.d/munin-node.sh start >+******************************************************************** >+ >+The Munin client will *not* be started automatically. To allow it >+to start, put this line in /etc/rc.conf: >+ >+munin_node_enable="YES" >+ >+Then, it will be started on the next boot. To start it now, use >+this command: >+ >+ /etc/rc.d/munin_node start > ******************************************************************** > >diff -ruN ports/sysutils/munin-node-1.0.3/files/pkg-message.4 ports/sysutils/munin-node/files/pkg-message.4 >--- ports/sysutils/munin-node-1.0.3/files/pkg-message.4 Thu Jan 1 01:00:00 1970 >+++ ports/sysutils/munin-node/files/pkg-message.4 Tue Mar 2 16:54:05 2004 >@@ -0,0 +1,12 @@ >+ >+******************************************************************** >+Unless this file already existed, a sample configuration file >+has been placed in %%PREFIX%%/etc/munin/munin-node.conf. >+ >+Please edit it according to your needs. >+ >+The Munin client will be started at system boot automatically. >+You can start it manually with: >+ %%PREFIX%%/etc/rc.d/munin-node.sh start >+******************************************************************** >+ >diff -ruN ports/sysutils/munin-node-1.0.3/pkg-deinstall ports/sysutils/munin-node/pkg-deinstall >--- ports/sysutils/munin-node-1.0.3/pkg-deinstall Tue Mar 2 16:54:05 2004 >+++ ports/sysutils/munin-node/pkg-deinstall Sat Nov 20 13:49:49 2004 >@@ -36,8 +36,8 @@ > } > > stop_process() { >- if [ -x ${PKG_PREFIX}/etc/rc.d/munin-node.sh ]; then >- ${PKG_PREFIX}/etc/rc.d/munin-node.sh stop >+ if [ -x $STARTSTOP ]; then >+ $STARTSTOP stop > fi > } > >@@ -51,9 +51,17 @@ > fi > } > >+OSVERSION=`/sbin/sysctl -n kern.osreldate` >+if [ $OSVERSION -lt 500000 ]; then >+ STARTSTOP=${PKG_PREFIX}/etc/rc.d/munin-node.sh >+else >+ STARTSTOP=/etc/rc.d/munin_node >+fi >+ > case $2 in > DEINSTALL) > stop_process >+ exit 0 # ignore error > ;; > POST-DEINSTALL) > delete_group munin >diff -ruN ports/sysutils/munin-node-1.0.3/pkg-plist ports/sysutils/munin-node/pkg-plist >--- ports/sysutils/munin-node-1.0.3/pkg-plist Thu Nov 18 06:56:53 2004 >+++ ports/sysutils/munin-node/pkg-plist Sat Nov 20 13:53:17 2004 >@@ -1,7 +1,10 @@ > @comment etc/munin/VERSION.node must remain for upgrade version check >-etc/munin/munin-node.conf >-etc/munin/plugin-conf.d/plugins.conf >-etc/rc.d/munin-node.sh >+@unexec if cmp -s %D/etc/munin/munin-node.conf %D/etc/munin/munin-node.conf.sample; then rm -f %D/etc/munin/munin-node.conf; fi >+etc/munin/munin-node.conf.sample >+@unexec if cmp -s %D/etc/munin/plugin-conf.d/plugins.conf %D/etc/munin/plugin-conf.d/plugins.conf.sample; then rm -f %D/etc/munin/plugin-conf.d/plugins.conf; fi >+etc/munin/plugin-conf.d/plugins.conf.sample >+@unexec rm %D/etc/rc.d/munin-node.sh 2>/dev/null || true >+@unexec rm /etc/rc.d/munin_node 2>/dev/null || true > sbin/munin-node > sbin/munin-node-configure > sbin/munin-run >@@ -73,7 +76,11 @@ > @unexec rmdir %D/%%DATADIR%% 2>/dev/null || true > @unexec rmdir %D/etc/munin/plugin-conf.d 2>/dev/null || true > @unexec rmdir %D/etc/munin 2>/dev/null || true >+@unexec echo >+@unexec echo '********************************************************************' > @unexec echo "If you want to *completely* remove munin-node, you have to" >-@unexec echo " rm -rf %D/var/munin and %D/etc/munin %D/www/data/munin" >+@unexec echo " rm -rf %D/var/munin %D/etc/munin %D/www/data/munin" > @unexec echo "They have to be left on the system because you may be performing" > @unexec echo "an update. This process can't tell." >+@unexec echo '********************************************************************' >+@unexec echo
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 74166
: 48464