diff options
author | Sergey Matveychuk <sem@FreeBSD.org> | 2004-12-14 01:43:10 +0000 |
---|---|---|
committer | Sergey Matveychuk <sem@FreeBSD.org> | 2004-12-14 01:43:10 +0000 |
commit | d1fe1cbc7c11aea833498ee115fe885fad59b5ba (patch) | |
tree | 4c41ab291f7080400f711fdaa6d10fe3e76dc001 /sysutils/munin-node | |
parent | change 2.0 references to 2.x references (diff) |
- Update to 1.0.4
* it unbreaks munin-node
PR: ports/74165, ports/74166
Submitted by: maintainer
Diffstat (limited to 'sysutils/munin-node')
-rw-r--r-- | sysutils/munin-node/Makefile | 24 | ||||
-rw-r--r-- | sysutils/munin-node/distinfo | 4 | ||||
-rw-r--r-- | sysutils/munin-node/files/munin-node.sh | 8 | ||||
-rw-r--r-- | sysutils/munin-node/files/pkg-message | 14 | ||||
-rw-r--r-- | sysutils/munin-node/pkg-deinstall | 15 | ||||
-rw-r--r-- | sysutils/munin-node/pkg-plist | 27 |
6 files changed, 70 insertions, 22 deletions
diff --git a/sysutils/munin-node/Makefile b/sysutils/munin-node/Makefile index daa671ddfd1e..016835799bb0 100644 --- a/sysutils/munin-node/Makefile +++ b/sysutils/munin-node/Makefile @@ -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 @@ -25,10 +25,6 @@ BUILD_DEPENDS= ${RUN_DEPENDS} RUN_DEPENDS+= ${SITE_PERL}/Net/Domain.pm:${PORTSDIR}/net/p5-Net .endif -.if ${OSVERSION} >= 503000 -BROKEN= "Broken pkg-plist on FreeBSD >= 5.x" -.endif - USE_GMAKE= yes PATCH_STRIP= -p1 WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.p/pre/} @@ -36,17 +32,29 @@ PKGMESSAGE= ${WRKDIR}/pkg-message 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 +.else +PKGMSG=${FILESDIR}/pkg-message +STARTSTOP_SRC=${FILESDIR}/munin_node.sh +.endif +STARTSTOP_DST=${PREFIX}/etc/rc.d/munin-node.sh + 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%@${PREFIX}@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 --git a/sysutils/munin-node/distinfo b/sysutils/munin-node/distinfo index a13f89708501..1db411157e37 100644 --- a/sysutils/munin-node/distinfo +++ b/sysutils/munin-node/distinfo @@ -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 --git a/sysutils/munin-node/files/munin-node.sh b/sysutils/munin-node/files/munin-node.sh index a0b47d4e1f58..fb88e12f06aa 100644 --- a/sysutils/munin-node/files/munin-node.sh +++ b/sysutils/munin-node/files/munin-node.sh @@ -14,7 +14,13 @@ case "$1" in 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 --git a/sysutils/munin-node/files/pkg-message b/sysutils/munin-node/files/pkg-message index 206a44057599..96d07954fde4 100644 --- a/sysutils/munin-node/files/pkg-message +++ b/sysutils/munin-node/files/pkg-message @@ -5,8 +5,16 @@ 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 +******************************************************************** + +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 --git a/sysutils/munin-node/pkg-deinstall b/sysutils/munin-node/pkg-deinstall index 217b827f561c..54e8e509cd30 100644 --- a/sysutils/munin-node/pkg-deinstall +++ b/sysutils/munin-node/pkg-deinstall @@ -1,6 +1,9 @@ #! /bin/sh # # $Log: pkg-deinstall,v $ +# Revision 1.2.2.1 2004/11/21 10:52:27 lupe +# make stop_process use old or new start-stop script. +# # Revision 1.2 2004/02/06 18:49:58 lupe # Fixes for pkg_add compatibility. # @@ -36,8 +39,8 @@ yesno() { } 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 +54,17 @@ delete_group() { 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 --git a/sysutils/munin-node/pkg-plist b/sysutils/munin-node/pkg-plist index f01440aa16b9..295efbf665e2 100644 --- a/sysutils/munin-node/pkg-plist +++ b/sysutils/munin-node/pkg-plist @@ -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,19 @@ sbin/munin-run @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 "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 " rm -rf %D/var/munin/plugin-state %D/etc/munin/VERSION.node \\" +@unexec echo " %D/etc/munin/munin-node.conf %D/etc/munin/plugins \\" +@unexec echo " /var/log/munin-node.log*" +@unexec echo +@unexec echo "If you have already deinstalled munin-main, you can also" +@unexec echo +@unexec echo " rmdir %D/etc/munin %D/var/munin" +@unexec echo +@unexec echo "These files and directories have to be left on the system because" +@unexec echo "you may be performing an update. This process can't tell." +@unexec echo '********************************************************************' +@unexec echo |