summaryrefslogtreecommitdiff
path: root/sysutils/munin-node
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2008-10-15 13:13:09 +0000
committerhe <he@pkgsrc.org>2008-10-15 13:13:09 +0000
commitc2c18a008e19188fb1c1846258ab5e5fdf286b0a (patch)
treec62753b83653e7439be3430a042c24d509969fb7 /sysutils/munin-node
parent3b5d0c70a5f6ee975b060d1188aa7b6539e36245 (diff)
downloadpkgsrc-c2c18a008e19188fb1c1846258ab5e5fdf286b0a.tar.gz
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.
Diffstat (limited to 'sysutils/munin-node')
-rw-r--r--sysutils/munin-node/Makefile3
-rwxr-xr-xsysutils/munin-node/files/node/node.d.netbsd/open_files.in11
2 files changed, 9 insertions, 5 deletions
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