Index: head/sysutils/munin-node/Makefile =================================================================== --- head/sysutils/munin-node/Makefile (revision 372916) +++ head/sysutils/munin-node/Makefile (revision 372917) @@ -1,90 +1,90 @@ # Created by: Lupe Christoph # $FreeBSD$ PORTNAME= munin PORTVERSION= ${MUNIN_VERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils perl5 MASTER_SITES= ${MUNIN_SITES} PKGNAMESUFFIX= -node MAINTAINER= mat@FreeBSD.org COMMENT= Node-specific part of Munin BUILD_DEPENDS= p5-Module-Build>=0:${PORTSDIR}/devel/p5-Module-Build \ p5-DateTime-HiRes>=0:${PORTSDIR}/devel/p5-DateTime-HiRes \ munin-common>=0:${PORTSDIR}/sysutils/munin-common \ p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \ bash:${PORTSDIR}/shells/bash RUN_DEPENDS= p5-Cache-Cache>=0:${PORTSDIR}/devel/p5-Cache-Cache \ p5-DateTime-HiRes>=0:${PORTSDIR}/devel/p5-DateTime-HiRes \ munin-common>=0:${PORTSDIR}/sysutils/munin-common \ p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \ p5-Net-CIDR>=0:${PORTSDIR}/net-mgmt/p5-Net-CIDR \ p5-libwww>=0:${PORTSDIR}/www/p5-libwww \ bash:${PORTSDIR}/shells/bash USES= gmake perl5 shebangfix PKGMESSAGE= ${WRKDIR}/pkg-message REINPLACE_ARGS= -i "" SHEBANG_FILES= node/sbin/munin-node node/sbin/munin-sched \ node/sbin/munin-run node/sbin/munin-node-configure .include "${.CURDIR}/../munin-common/munin.mk" ALL_TARGET= build-node build-plugins INSTALL_TARGET= install-node-prime install-plugins-prime NO_ARCH= yes OPTIONS_DEFINE= SNMP PERL JAVA OPTIONS_DEFAULT= SNMP PERL OPTIONS_SUB= yes SNMP_DESC= Include SNMP plugins PERL_DESC= Include all Perl modules (adds dependencies) JAVA_DESC= Include JAVA plugins SNMP_BUILD_DEPENDS= p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP SNMP_RUN_DEPENDS= p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP PERL_RUN_DEPENDS= p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg \ p5-Net-DNS>=0:${PORTSDIR}/dns/p5-Net-DNS \ p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser \ p5-XML-LibXML>=0:${PORTSDIR}/textproc/p5-XML-LibXML JAVA_USE= java=yes JAVA_INSTALL_TARGET= install-plugins-java JAVA_BUILD= yes JAVA_RUN= yes SUB_FILES= pkg-message plugins.conf USE_RC_SUBR= munin-node munin-sched post-patch: @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ ${WRKSRC}/node/sbin/munin-node \ ${WRKSRC}/node/sbin/munin-node-configure \ ${WRKSRC}/node/sbin/munin-run @${REINPLACE_CMD} \ -e 's|^\(BASH[[:space:]]*:=\).*|\1 ${bash_CMD}|' \ -e 's|^\(JAVARUN[[:space:]]*:=\).*|\1 ${java_CMD}|' \ -e 's|^\(PERL[[:space:]]*:=\).*|\1 ${perl_CMD}|' \ -e 's|^\(PYTHON[[:space:]]*:=\).*|\1 ${python_CMD}|' \ -e 's|^\(RUBY[[:space:]]*:=\).*|\1 ${ruby_CMD}|' \ ${WRKSRC}/Makefile.config @${FIND} ${WRKSRC}/node/sbin -type f -name "*.orig" -delete post-install: ${MKDIR} ${STAGEDIR}${DBDIR}/plugin-state ${INSTALL_SCRIPT} ${WRKDIR}/munin-node \ ${STAGEDIR}${PREFIX}/etc/rc.d/munin-node ${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf \ ${STAGEDIR}${ETCDIR}/munin-node.conf.sample ${INSTALL_DATA} ${WRKDIR}/plugins.conf \ ${STAGEDIR}${ETCDIR}/plugin-conf.d/plugins.conf.sample (cd ${WRKSRC}/node/blib/bindoc; \ ${INSTALL_MAN} munin-node-configure.1 munin-node.1 munin-run.1 munin-sched.1 munindoc.1 ${STAGEDIR}${MAN1PREFIX}/man/man1; \ ) (cd ${WRKSRC}/build/doc; \ ${INSTALL_MAN} munin-node.conf.5 ${STAGEDIR}${MAN5PREFIX}/man/man5; \ ${INSTALL_MAN} munin.8 ${STAGEDIR}${MAN8PREFIX}/man/man8; \ ) .include Index: head/sysutils/munin-node/files/patch-plugins_node.d_nutups__.in =================================================================== --- head/sysutils/munin-node/files/patch-plugins_node.d_nutups__.in (nonexistent) +++ head/sysutils/munin-node/files/patch-plugins_node.d_nutups__.in (revision 372917) @@ -0,0 +1,67 @@ +--- plugins/node.d/nutups_.in.orig 2014-10-26 14:12:24 UTC ++++ plugins/node.d/nutups_.in +@@ -7,20 +7,25 @@ + # + # usage: ups_upsid_function + # ++# env.upsc (default: "/bin/upsc") ++# env.upsconf (default: "/etc/nut/ups.conf") ++# + #%# family=contrib + #%# capabilities=autoconf suggest + + UPS=$(basename $0 | cut -d_ -f2) + FUNCTION=$(basename $0 | cut -d_ -f3) ++UPSC=${upsc:-/bin/upsc} ++UPSCONF=${upsconf:-/etc/nut/ups.conf} + + if [ "$1" = "autoconf" ]; then +- [ -x /bin/upsc ] && [ -r /etc/nut/ups.conf ] && echo yes && exit 0 +- echo "no (/bin/upsc or /etc/nut/ups.conf not found)" ++ [ -x $UPSC ] && [ -r $UPSCONF ] && echo yes && exit 0 ++ echo "no ($UPSC or $UPSCONF not found)" + exit 0 + fi + + if [ "$1" = "suggest" ]; then +- grep '^\[[^]]*\]$' /etc/nut/ups.conf \ ++ grep '^\[[^]]*\]$' $UPSCONF \ + | tr -d '][' \ + | while read ups; do + for i in voltages freq charge current; do +@@ -42,7 +47,7 @@ voltages() { + echo "${i}.min 0" + done + else +- upsc $UPS | sed -n '/volt/{ ++ $UPSC $UPS | sed -n '/volt/{ + s/:// + /nominal/s/.* /nominal.value / + /voltage/s/\.[^ ]*/.value/ +@@ -64,7 +69,7 @@ charge() { + echo "${i}.min 0" + done + else +- upsc $UPS | sed -n '/charge/{ ++ $UPSC $UPS | sed -n '/charge/{ + s/^[^:]*\.//g + s/:/.value/ + p +@@ -87,7 +92,7 @@ frequency() { + echo "acfreq.max 100" + echo "acfreq.min 5" + else +- upsc $UPS | sed -n '/freq/{s/.*:/acfreq.value/;p}' ++ $UPSC $UPS | sed -n '/freq/{s/.*:/acfreq.value/;p}' + fi + } + +@@ -102,7 +107,7 @@ current() { + echo "current.max 100" + echo "current.min 0" + else +- upsc $UPS | sed -n '/current/{s/.*:/current.value/;p}' ++ $UPSC $UPS | sed -n '/current/{s/.*:/current.value/;p}' + fi + } + Property changes on: head/sysutils/munin-node/files/patch-plugins_node.d_nutups__.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/munin-node/files/plugins.conf.in =================================================================== --- head/sysutils/munin-node/files/plugins.conf.in (revision 372916) +++ head/sysutils/munin-node/files/plugins.conf.in (revision 372917) @@ -1,64 +1,68 @@ # # This file contains configuration options for the plugins. Three # options are understood by munin-node itself: # # user # Set the user to run the plugin as # group # Set the group to run the plugin as # command # Run instead of the plugin. %c # expands to what would normally be run. # env. # Sets in the plugin's environment, see the # individual plugins to find out which variables they # care about. # # Note that many of the environment variables are just guesses # because the port maintainer did not bother to install all the # software that the Munin plugins can monitor. Please don't hesitate # to file a PR against the munin-node port if you find an error. # The logtail program used by many plugins is installed with the # port security/logcheck. The munin-node port has no dependency on # that port because most plugins do not require it. [amavis] env.amavislog /var/log/maillog env.logtail %%LOCALBASE%%/bin/logtail [courier_*] env.logfile /var/log/maillog env.logtail %%LOCALBASE%%/bin/logtail [dhcp3] env.configfile %%LOCALBASE%%/etc/dhcpd.conf env.leasefile /var/db/dhcpd.leases [exim*] group mail env.exim %%LOCALBASE%%/sbin/exim [smart_*] group operator env.smartctl %%LOCALBASE%%/sbin/smartctl [hddtemp_smartctl] group operator env.smartctl %%LOCALBASE%%/sbin/smartctl [mbmon*] env.mbmon %%LOCALBASE%%/bin/mbmon [mysql*] env.mysql %%LOCALBASE%%/bin/mysql env.mysqladmin %%LOCALBASE%%/bin/mysqladmin env.mysqlshow %%LOCALBASE%%/bin/mysqlshow [postfix*] user root env.logfile /var/log/maillog [sendmail*] env.mspqueue /var/spool/clientmqueue env.mailstats /usr/sbin/mailstats [fail2ban*] user root env.client %%LOCALBASE%%/bin/fail2ban-client + +[nut*] +env.upsc %%LOCALBASE%%/bin/upsc +env.upsconf %%LOCALBASE%%/etc/nut/ups.conf"