diff options
-rw-r--r-- | Makefile.PL | 6 | ||||
-rw-r--r-- | SENDMAIL-STATS.txt | 9 | ||||
-rwxr-xr-x | install-mib.pl | 3 |
3 files changed, 10 insertions, 8 deletions
diff --git a/Makefile.PL b/Makefile.PL index 1cc23a6..4129fa9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -40,13 +40,13 @@ Sendmail.pm: Sendmail.mib2c sendmail.pl SENDMAIL-STATS.txt MIBS="+SENDMAIL-STATS" \ mib2c -c Sendmail.mib2c -f Sendmail.pm -S prologue=sendmail.pl SENDMAIL-STATS::sendmail -INSTALLSITEMIB = $(SITEPREFIX)/share/snmp/mibs -DESTINSTALLSITEMIB = $(DESTDIR)$(INSTALLSITEMIB) +INSTALLMIB = $(PREFIX)/share/snmp/mibs +DESTINSTALLMIB = $(DESTDIR)$(INSTALLMIB) install:: install-mib install-mib: - $(PERLRUN) install-mib.pl SENDMAIL-STATS.txt $(DESTINSTALLSITEMIB) + $(PERLRUN) install-mib.pl SENDMAIL-STATS.txt $(DESTINSTALLMIB) _MAKE_ } diff --git a/SENDMAIL-STATS.txt b/SENDMAIL-STATS.txt index bf6f7e8..ab1280e 100644 --- a/SENDMAIL-STATS.txt +++ b/SENDMAIL-STATS.txt @@ -7,7 +7,8 @@ SENDMAIL-STATS DEFINITIONS ::= BEGIN -- ************************************************************* IMPORTS - MODULE-IDENTITY, OBJECT-TYPE, enterprises, Counter64, Integer32 + MODULE-IDENTITY, OBJECT-TYPE, enterprises, Integer32, Counter64, + Gauge32 FROM SNMPv2-SMI TEXTUAL-CONVENTION FROM SNMPv2-TC @@ -28,7 +29,7 @@ sendmail MODULE-IDENTITY queue OBJECT IDENTIFIER ::= { sendmail 1 } queueTotal OBJECT-TYPE - SYNTAX Counter64 + SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -51,7 +52,7 @@ QueueEntry ::= SEQUENCE { queueIndex Integer32, queueName QueueNameString, queueDirectory QueuePathString, - queueMessages Counter64 + queueMessages Gauge32 } queueTable OBJECT-TYPE @@ -96,7 +97,7 @@ queueDirectory OBJECT-TYPE ::= { queueEntry 3 } queueMessages OBJECT-TYPE - SYNTAX Counter64 + SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION diff --git a/install-mib.pl b/install-mib.pl index 56461a8..54d9e5e 100755 --- a/install-mib.pl +++ b/install-mib.pl @@ -3,6 +3,7 @@ use strict; use File::Basename; use File::Copy; +use File::Path qw(make_path); use autodie; # install-mib FILE DIR @@ -25,7 +26,7 @@ close($fd); die "no MIB definition in $file" unless defined $mibname; -mkdir($destdir) unless -e $destdir; +make_path($destdir) unless -e $destdir; copy($file, $destdir); |