From c2c18a008e19188fb1c1846258ab5e5fdf286b0a Mon Sep 17 00:00:00 2001 From: he Date: Wed, 15 Oct 2008 13:13:09 +0000 Subject: Convert from using an input-less awk job (how did that ever work?) to using shell arithmetic, which should be more light-weight and should not pose a danger of hanging. --- sysutils/munin-node/Makefile | 3 ++- sysutils/munin-node/files/node/node.d.netbsd/open_files.in | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'sysutils/munin-node') diff --git a/sysutils/munin-node/Makefile b/sysutils/munin-node/Makefile index 2f80d87a03a..f830394d3ba 100644 --- a/sysutils/munin-node/Makefile +++ b/sysutils/munin-node/Makefile @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.9 2007/07/04 20:55:00 jlam Exp $ +# $NetBSD: Makefile,v 1.10 2008/10/15 13:13:09 he Exp $ # DISTNAME= munin_${VER} VER= 1.3.2 PKGNAME= munin-node-${VER} +PKGREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=munin/} diff --git a/sysutils/munin-node/files/node/node.d.netbsd/open_files.in b/sysutils/munin-node/files/node/node.d.netbsd/open_files.in index 5ed473ba126..f8d5349e838 100755 --- a/sysutils/munin-node/files/node/node.d.netbsd/open_files.in +++ b/sysutils/munin-node/files/node/node.d.netbsd/open_files.in @@ -8,6 +8,11 @@ # autoconf (optional - used by munin-config) # # $Log: open_files.in,v $ +# Revision 1.2 2008/10/15 13:13:09 he +# Convert from using an input-less awk job (how did that ever work?) +# to using shell arithmetic, which should be more light-weight and should +# not pose a danger of hanging. +# # Revision 1.1.1.1 2006/06/04 20:53:57 he # Import the client version of the Munin system monitoring/graphing # tool -- project homepage is at http://munin.sourceforge.net/ @@ -67,10 +72,8 @@ if [ "$1" = "config" ]; then echo 'max.label max open files' echo 'max.info The maximum supported number of open files.' - awk -v filemax=$filemax '{ - printf "used.warning %d\n", $filemax * 0.92; - printf "used.critical %d\n", $filemax * 0.98; -}' + echo "used.warning $(($filemax * 92/100))" + echo "used.critical $(($filemax * 98/100))" exit 0 fi -- cgit v1.2.3