Index: npl/monitoring/cricket/cricket.SlackBuild
===================================================================
--- npl/monitoring/cricket/cricket.SlackBuild	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/monitoring/cricket/cricket.SlackBuild	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,33 @@
+#!/bin/bash
+#DEP:rrdtool
+#DEP:libart_lgpl
+#DEP:libpng
+#DEP:perlmod_SNMP_Session
+
+NAME=cricket
+VER=1.0.5
+CWD=`pwd`
+PKGTMP=/tmp/pkgtmp
+
+mkdir -p $PKGTMP &>/dev/null
+
+tar -xzf $NAME-$VER.tar.gz || exit 1
+
+cd $NAME-$VER || exit 1
+
+./configure || exit 1
+
+
+mkdir -p $PKGTMP/usr/cricket
+cp -a * $PKGTMP/usr/cricket || exit 1
+cp $CWD/subtree-sets $PKGTMP/usr/cricket || exit 1
+
+#dit is een gefixte versie omdat we een nieuwe versie 
+#van perl hebben. (komt uit cvs)
+cp $CWD/snmp.pm $PKGTMP/usr/cricket/lib || exit 1
+
+cd "$PKGTMP" || exit 1
+makepkg -l y -c n $CWD/$NAME.pkg > /dev/null &&
+echo $VER > $CWD/$NAME.version &&
+arch > $CWD/$NAME.arch 
+
Index: npl/monitoring/cricket/cricket.arch
===================================================================
--- npl/monitoring/cricket/cricket.arch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/monitoring/cricket/cricket.arch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,1 @@
+i586
Index: npl/monitoring/cricket/cricket.depver
===================================================================
--- npl/monitoring/cricket/cricket.depver	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/monitoring/cricket/cricket.depver	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,4 @@
+rrdtool	0
+libart_lgpl	0
+libpng	1
+perlmod_SNMP_Session	0
Index: npl/monitoring/cricket/cricket.md5
===================================================================
--- npl/monitoring/cricket/cricket.md5	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/monitoring/cricket/cricket.md5	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,6 @@
+916ae8ffa1f9b3c9933f47aff3a87d54  ./cricket-1.0.5.tar.gz
+1f3e62339798caccef7fbf3eb573179d  ./cricket.pkg
+7e561dff575a7effadf6b8801e6f47b7  ./cricket.SlackBuild
+e7a3cea8ef43871dd4da7a39f8ddc2c7  ./cricket.SlackBuild.log.gz
+c7e0c61736d8ced2093de12dbeb10ef2  ./snmp.pm
+c0ec50f62b06eef93bf73af5cef5eaca  ./subtree-sets
Index: npl/monitoring/cricket/cricket.version
===================================================================
--- npl/monitoring/cricket/cricket.version	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/monitoring/cricket/cricket.version	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,1 @@
+1.0.5
Index: npl/monitoring/cricket/snmp.pm
===================================================================
--- npl/monitoring/cricket/snmp.pm	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/monitoring/cricket/snmp.pm	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,126 @@
+# -*-perl-*-
+
+# Cricket: a configuration, polling and data display wrapper for RRD files
+#
+#    Copyright (C) 1998 Jeff R. Allen and WebTV Networks, Inc.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# This lets people replace our choice of snmp libraries by simply
+# replacing snmpUtils.pm (Ed, this means you! <wink>)
+
+use snmpUtils;
+
+use Common::Log;
+
+use strict;
+
+# This tells the collector that we are open for business and
+# happy to handle snmp:// datasources.
+$main::gDSFetch{'snmp'} = \&snmpFetch;
+
+sub snmpFetch {
+    # This procedure is passed a REFERENCE to an array of SNMP datasources.
+    #
+    # Each element consists of a string like:
+    #       index://community@host:port/oid
+    # community and port are optional. If they are left out, they
+    # will default to public and 161, respectively.
+    #
+    # VERY IMPORTANT: The index MUST be returned with the corresponding value,
+    # otherwise it'll get put back into the wrong spot in the RRD.
+
+    my($dsList, $name, $target) = @_;
+    my(%oidsPerSnmp) = ();
+
+    my($dsspec);
+    my($oidMap) = $main::gCT->configHash($name, 'oid');
+    foreach $dsspec (@{ $dsList }) {
+        my($index);
+
+        ($index, $dsspec) = split(/:/, $dsspec, 2);
+        $dsspec =~ s#^//##;
+
+        # This little hack is for people who like to use slashes in their
+        # community strings.
+        my($comm, $cinfo) = split(/@/, $dsspec, 2);
+        my($snmp, $oid)   = split(/\//, $cinfo, 2);
+        $snmp = $comm . "@" . $snmp;
+
+        $oid = mapOid($oidMap, $oid);
+        if (! defined $oid) {
+            Warn("Could not find an OID in $dsspec");
+            return ();
+        }
+
+        # Debug("SNMP parser: snmp://$snmp/$oid");
+
+        # we only try to process them if we didn't find a problem
+        # above (hence the check for undef)
+        push(@{ $oidsPerSnmp{$snmp} }, "$index:$oid")
+            if (defined $oid);
+    }
+
+    my(@results) = ();
+
+    while (my($snmp, $snmpDSRef) = each %oidsPerSnmp) {
+        my(@oidsToQuery) = ();
+
+        if ($#{ $snmpDSRef } >= 0) {
+            my(@oidsToQuery) = ();
+            my(@indices) = ();
+            my($line);
+            while ($line = shift @{ $snmpDSRef }) {
+                my($index, $oid) = split(/:/, $line);
+                push(@indices, $index); push(@oidsToQuery, $oid);
+            }
+
+            Debug("Getting from $snmp ", join(" ", @oidsToQuery));
+            my(@hostResults) = snmpUtils::get($snmp, @oidsToQuery);
+            if (isDebug()) { Debug("Got: ", join(" ", @hostResults)); }
+
+            # it tells us everything went to hell by returning
+            # scalar -1. Unfortunately, we interpret that as the first
+            # result. So, make it undef so that we fix it later.
+            # hopefully, we don't need to fetch a -1 all the time...
+
+            if (defined($hostResults[0]) && $hostResults[0] == -1) {
+                $hostResults[0] = undef;
+            }
+
+            # turn undefs into "U"'s to make RRD happy
+            my($ctr);
+            for $ctr ( 0..$#indices ) {
+                my($res) = $hostResults[$ctr];
+                $res = "U" if (! defined($res));
+				# previously called fixNum() here, but that breaks mapped
+				# instances which rely on the fact that the snmp result
+				# may be non-numeric
+                push(@results, "$indices[$ctr]:" . $res);
+            }
+        }
+    }
+
+    return @results;
+}
+
+1;
+
+# Local Variables:
+# mode: perl
+# indent-tabs-mode: nil
+# tab-width: 4
+# perl-indent-level: 4
+# End:
Index: npl/monitoring/cricket/subtree-sets
===================================================================
--- npl/monitoring/cricket/subtree-sets	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/monitoring/cricket/subtree-sets	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,13 @@
+# This file lists the subtrees that will be processed together in one
+# set. See the comments at the beginning of collect-subtrees for more info.
+
+# This will be passed to collector so it can find the Config Tree.
+# If this directory does not start with a slash, it will
+# have $HOME prepended.
+base:   cricket-config
+
+# this is where logs will be put. (The $HOME rule applies here too.)
+logdir: cricket-logs
+
+set normal:
+	/
