1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Various fixes / improvements.

See PR for details.

PR:		ports/63759
Submitted by:	Cyrille Lefevre <cyrille.lefevre@laposte.net>
This commit is contained in:
Jun Kuriyama 2004-03-10 13:40:41 +00:00
parent f94ee3fd39
commit ef7f2d6bba
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=103525
57 changed files with 2160 additions and 747 deletions

View File

@ -5,16 +5,29 @@
# $FreeBSD$
#
PORTNAME= net-snmp
PORTNAME= snmp
PORTVERSION= 5.1
PORTREVISION= 2
PORTREVISION= 3
PKGNAMEPREFIX= net-
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
DISTNAME= ${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION}
.if defined(WITH_INETADDRESS_HACK)
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-snmplib::mib.c
.endif
.if !defined(WITH_TKMIB)
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-local:Makefile.in
.endif
MAINTAINER= kuriyama@FreeBSD.org
COMMENT= An extendable SNMP implementation
.if defined(WITH_TKMIB)
RUN_DEPEND= ${SITE_PERL}/${PERL_ARCH}/Tk.pm:${PORTSDIR}/x11-toolkits/p5-Tk
.endif
USE_REINPLACE= yes
USE_AUTOCONF_VER=257
USE_LIBTOOL= yes
@ -26,27 +39,79 @@ NO_LATEST_LINK= yes
USE_PERL5= yes
.endif
CONFIGURE_ARGS+=--enable-shared --with-mib-modules="${NET_SNMP_MIB_MODULES}" \
CONFIGURE_ENV+= PERLPROG="${PERL}" PSPROG="${PS_CMD}" SED="${SED}"
CONFIGURE_ARGS+=--enable-shared --enable-internal-md5 \
--with-mib-modules="${_NET_SNMP_MIB_MODULES}" \
--with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
--with-sys-contact="${NET_SNMP_SYS_CONTACT}" \
--with-sys-location="${NET_SNMP_SYS_LOCATION}" \
--with-logfile="${NET_SNMP_LOGFILE}" \
--with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat" \
--with-defaults
.if defined(WITHOUT_PERL)
PLIST_SUB+= WITHPERL="@comment "
.else
CONFIGURE_ARGS+= --with-perl-modules
PLIST_SUB+= WITHPERL=""
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat"
.if defined(BATCH)
CONFIGURE_ARGS+=--with-defaults
.endif
.if !defined(WITHOUT_DUMMY_VALUES)
CONFIGURE_ARGS+=--with-dummy-values
.endif
.include <bsd.port.pre.mk>
.if defined(WITHOUT_PERL)
PLIST_SUB+= WITH_PERL="@comment "
.else
CONFIGURE_ARGS+=--enable-embedded-perl --with-perl-modules
PLIST_SUB+= WITH_PERL=""
.endif
.if defined(WITH_TKMIB)
PLIST_SUB+= WITH_TKMIB=""
.else
PLIST_SUB+= WITH_TKMIB="@comment "
.endif
.if ${OSVERSION} >= 400014 && !defined(WITHOUT_IPV6)
CONFIGURE_ARGS+=--enable-ipv6
# --with-transport="UDPIPv6 TCPIPv6" --with-modules=mibII/ipv6"
PLIST_SUB+= WITH_IPV6=""
.else
PLIST_SUB+= WITH_IPV6="@comment "
.endif
SHLIB_VERSION= 6
PLIST_SUB+= SHLIB_VERSION=${SHLIB_VERSION}
LIBTOOL_SUB= LTCONFIG=${LIBTOOL_SHAREDIR}/ltconfig${LIBTOOL_VERSION} \
LTMAIN=${LIBTOOL_SHAREDIR}/ltmain.sh
SCRIPTS_SUB= PREFIX=${PREFIX} PERL=${PERL}
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
DEFAULT_SNMP_VERSION?= 3
NET_SNMP_SYS_CONTACT?= nobody@no.where
NET_SNMP_SYS_LOCATION?=
NET_SNMP_SYS_CONTACT?= nobody@nowhere.invalid
NET_SNMP_SYS_LOCATION?= somewhere
NET_SNMP_LOGFILE?= /var/log/snmpd.log
NET_SNMP_PERSISTENTDIR?=/var/net-snmp
NET_SNMP_MIB_MODULES?= host smux ucd-snmp/diskio
NET_SNMP_MIB_MODULES?= ${NET_SNMP_MIB_MODULE_LIST}
NET_SNMP_MIB_MODULE_LIST=host disman/event-mib smux mibII/mta_sendmail ucd-snmp/diskio
_NET_SNMP_MIB_MODULES=
.for module1 in ${NET_SNMP_MIB_MODULE_LIST}
_module1=${module1}
_define= false
. for module2 in ${NET_SNMP_MIB_MODULES}
_module2=${module2}
. if ${_module1} == ${_module2}
_define= true
. endif
. endfor
. if ${_define} == true
_NET_SNMP_MIB_MODULES+= ${module1}
PLIST_SUB+= WITH_${module1:C|.*/||:U}=""
. else
PLIST_SUB+= WITH_${module1:C|.*/||:U}="@comment "
. endif
.endfor
MAN1= mib2c.1 \
snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 \
@ -86,61 +151,112 @@ MAN3= add_mibdir.3 add_module_replacement.3 default_store.3 \
netsnmp_stash_cache.3 netsnmp_utilities.3
.if !defined(WITHOUT_PERL)
MAN3PERL= NetSNMP::default_store.3 NetSNMP::ASN.3 NetSNMP::OID.3 \
MAN3PERL= NetSNMP::ASN.3 NetSNMP::OID.3 NetSNMP::agent.3 \
NetSNMP::agent::default_store.3 \
NetSNMP::netsnmp_request_infoPtr.3 \
NetSNMP::agent.3 SNMP.3
NetSNMP::default_store.3 \
NetSNMP::netsnmp_request_infoPtr.3 SNMP.3
MAN3PERLPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
_MANPAGES+= ${MAN3PERL:S%^%${MAN3PERLPREFIX}/man/man3/%}
.endif
MAN5= snmp.conf.5 snmp_config.5 snmpd.conf.5 \
snmptrapd.conf.5 variables.5
MAN8= snmpd.8 snmptrapd.8
BIN= snmpbulkwalk snmpget snmpgetnext snmpnetstat snmpset \
BIN_FILES= snmpbulkwalk snmpget snmpgetnext snmpnetstat snmpset \
snmpstatus snmptest snmptranslate snmptrap snmpwalk
SBIN= snmpd snmptrapd
STARTUP_FILE= ${PREFIX}/etc/rc.d/snmpd.sh
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 400014
CONFIGURE_ARGS+=--enable-ipv6 \
--with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix"
SBIN_FILES= snmpd snmptrapd
STARTUP_DIR= ${PREFIX}/etc/rc.d
STARTUP_FILES= snmpd.sh snmptrapd.sh
SCRIPT_FILES= snmpcheck.def mib2c fixproc ipf-mod.pl snmpconf \
traptoemail
.if defined(WITH_TKMIB)
SCRIPT_FILES+= tkmib
.endif
DOC_FILES= AGENT.txt COPYING FAQ NEWS README \
README.agentx README.krb5 README.snmpv3 README.thread \
agent/mibgroup/README.smux
SHLIB_VERSION= 6
PLIST_SUB+= shlib=${SHLIB_VERSION}
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
PS_CMD?= /bin/ps
.if defined(WITH_INETADDRESS_HACK)
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-snmplib::mib.c
.endif
pre-everything::
@${ECHO_MSG}
@${ECHO_MSG} "You may use the following build options:"
@${ECHO_MSG}
@${ECHO_MSG} "WITH_INETADDRESS_HACK=yes builds with the inetaddress hack"
@${ECHO_MSG} "WITH_TKMIB=yes Install a graphical Perl/Tk/SNMP based mib browser"
@${ECHO_MSG} "WITHOUT_DUMMY_VALUES=yes Provide 'placeholder' dummy values where"
@${ECHO_MSG} " the necessary information is not available."
@${ECHO_MSG} "WITHOUT_PERL=yes Install the perl modules along with the rest"
@${ECHO_MSG} " of the net-snmp toolkit."
@${ECHO_MSG} "WITHOUT_IPV6=yes Generate IPv6 ready version."
@${ECHO_MSG}
@${ECHO_MSG} "DEFAULT_SNMP_VERSION=\"3\" Default version of SNMP to use."
@${ECHO_MSG} "NET_SNMP_SYS_CONTACT=\"${NET_SNMP_SYS_CONTACT}\""
@${ECHO_MSG} " Default system contact."
@${ECHO_MSG} "NET_SNMP_SYS_LOCATION=\"${NET_SNMP_SYS_LOCATION}\""
@${ECHO_MSG} " Default system location."
@${ECHO_MSG} "NET_SNMP_LOGFILE=\"${NET_SNMP_LOGFILE}\""
@${ECHO_MSG} " Default log file location for snmpd."
@${ECHO_MSG} "NET_SNMP_PERSISTENTDIR=\"${NET_SNMP_PERSISTENTDIR}\""
@${ECHO_MSG} " Default directory for persistent data storage."
@${ECHO_MSG} "NET_SNMP_MIB_MODULES=\"${NET_SNMP_MIB_MODULE_LIST}\""
@${ECHO_MSG} " Optional mib modules that can be built into the"
@${ECHO_MSG} " agent"
@${ECHO_MSG}
post-patch:
@${REINPLACE_CMD} \
-e 's|%%LTCONFIG%%|${LIBTOOL_SHAREDIR}/ltconfig${LIBTOOL_VERSION}|g' \
-e 's|%%LTMAIN%%|${LIBTOOL_SHAREDIR}/ltmain.sh|g' \
post-patch: patch-autoconf patch-script-files patch-startup-files
patch-autoconf:
@${REINPLACE_CMD} ${LIBTOOL_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/aclocal.m4
patch-script-files:
.for file in ${SCRIPT_FILES}
@${REINPLACE_CMD} ${SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/local/${file}
.endfor
patch-startup-files:
.for file in ${STARTUP_FILES}
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/${file}.sample > ${WRKDIR}/${file}
.endfor
post-configure:
@${FIND} ${WRKSRC} -name Makefile | \
${XARGS} ${PERL} -pi -e 's|$$| -m 755| if /^INSTALL\s+=/'
.if !defined(WITHOUT_PERL)
post-build:
@${FIND} ${CONFIGURE_WRKSRC}/perl -name Makefile | \
${XARGS} ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//'
${FIND} ${WRKSRC}/perl -name Makefile | \
${XARGS} ${PERL} -pi -e '\
s!^(PREFIX) = /usr/local!$$1 = ${PREFIX}!; \
s!^(INSTALLMAN3DIR) = /usr/local!$$1 = \$$\(PREFIX\)!; \
s! doc_(perl|site|\$$\(INSTALLDIRS\))_install$$!!; \
'
.endif
pre-install:
-@[ -f ${STARTUP_FILE} ] && \
(${ECHO} "Remove old ${STARTUP_FILE} before install." && exit 1)
post-install: strip-files install-startup-files install-doc-files display-message
post-install:
@( cd ${PREFIX}/bin && ${STRIP_CMD} ${BIN} )
@( cd ${PREFIX}/sbin && ${STRIP_CMD} ${SBIN} )
@${FIND} ${PREFIX}/include/net-snmp ${PREFIX}/share/snmp/mibs -type f \
| ${XARGS} ${CHMOD} 644
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/snmpd.sh.sample > ${STARTUP_FILE}
@${CHMOD} 755 ${STARTUP_FILE}
strip-files:
@cd ${PREFIX}/bin; ${STRIP_CMD} ${BIN_FILES}
@cd ${PREFIX}/sbin; ${STRIP_CMD} ${SBIN_FILES}
install-startup-files:
.for file in ${STARTUP_FILES}
@${INSTALL_SCRIPT} ${WRKDIR}/${file} ${STARTUP_DIR}
.endfor
install-doc-files:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
. for file in ${DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
. endfor
.endif
display-message:
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}

View File

@ -0,0 +1,11 @@
--- local/Makefile.in.orig Sat Apr 20 16:30:13 2002
+++ local/Makefile.in Wed Apr 24 01:45:55 2002
@@ -12,7 +12,7 @@
# local info
#
SNMPCONFPATH=@SNMPCONFPATH@
-PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail
+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail
SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
ipf-mod.pl.made snmpconf.made traptoemail.made
PERLPROG=@PERLPROG@

View File

@ -1,19 +1,47 @@
--- configure.in.orig Fri Nov 14 13:32:10 2003
+++ configure.in Fri Nov 14 13:36:27 2003
@@ -1357,7 +1357,7 @@
# fall back
--- configure.in.orig Thu Mar 6 07:41:13 2003
+++ configure.in Tue May 27 14:53:22 2003
@@ -1246,7 +1246,7 @@
dnl fall back
CFLAG="-f"
fi
-for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel
+for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel
+for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel /dev/null
do
if test -f $i -o $CFLAG $i; then
ac_cv_KERNEL_LOC="$i"
@@ -1376,6 +1376,7 @@
# Check for mount table location
#
@@ -1659,7 +1659,7 @@
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(stdarg.h string.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h netinet/ip.h netinet/ip_icmp.h net/if.h netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h sys/vm.h vm/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h linux/tasks.h pwd.h grp.h utmpx.h)
# FreeBSD required headers
-AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h machine/types.h sys/socketvar.h)
+AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h sys/socketvar.h)
# Linux
AC_CHECK_HEADERS(sys/conf.h netinet/in_systm.h netinet/tcp.h netinet/udp.h netinet/in_var.h netinet/if_ether.h netinet/ip_var.h netinet/tcp_timer.h netinet/tcp_var.h netinet/tcp_fsm.h netinet/udp_var.h netinet/icmp_var.h sys/protosw.h nlist.h ioctls.h asm/page.h netipx/ipx.h)
# NetBSD required headers
@@ -1866,6 +1866,26 @@
dnl checking for 4.3 vs 4.4 rtentry.
AC_CACHE_CHECK(type of rtentry structure,ac_cv_RTENTRY_TYPE,
[
+
+dnl 4.4 compatible but renamed on FreeBSD
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#define KERNEL
+#define _KERNEL
+#include <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#include <net/route.h>
+],[
+
+#ifndef STRUCT_RTENTRY_HAS_RT_DST
+#define rt_dst rt_nodes->rn_key
+#endif
+
+ struct rtentry rt;
+ rt.rt_nodes[0].rn_bit = 1;
+ rt.rt_dst;
+ ], ac_cv_RTENTRY_TYPE="BSD-4.4")
+# kuriyama: should /var/db/mounttab be used?
AC_CACHE_CHECK(for mount table location,ac_cv_ETC_MNTTAB,
[ac_cv_ETC_MNTTAB="unknown"
for i in /etc/mnttab /etc/mtab /etc/filesystems
dnl 4.4 compat
AC_TRY_COMPILE([

View File

@ -24,7 +24,7 @@
#elif defined(MBSTAT_SYMBOL)
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
long_return = mbstat.m_mbufs;
+#elif __FreeBSD_version < 500024
+#elif defined(freebsd5) && __FreeBSD_version < 500024
+ /* mbuf stats disabled */
+ return NULL;
+#else
@ -40,7 +40,7 @@
#elif defined(MBSTAT_SYMBOL)
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */
+#elif __FreeBSD_version < 500024
+#elif defined(freebsd5) && __FreeBSD_version < 500024
+ /* mbuf stats disabled */
+ return NULL;
+#else

View File

@ -1,23 +1,21 @@
--- agent/mibgroup/host/hr_system.c.orig Fri Nov 14 14:45:55 2003
+++ agent/mibgroup/host/hr_system.c Fri Nov 14 14:46:01 2003
@@ -276,11 +276,10 @@
struct utmp *utmp_p;
#endif
+#ifndef UTMP_HAS_NO_TYPE
setutent();
--- agent/mibgroup/host/hr_system.c.orig Sat Mar 1 05:35:13 2003
+++ agent/mibgroup/host/hr_system.c Sun Feb 8 17:39:50 2004
@@ -280,7 +280,6 @@
while ((utmp_p = getutent()) != NULL) {
-#ifndef UTMP_HAS_NO_TYPE
#ifndef UTMP_HAS_NO_TYPE
if (utmp_p->ut_type == USER_PROCESS) {
-#endif
/* This block of code fixes zombie user PIDs in the
utmp/utmpx file that would otherwise be counted as a
current user */
@@ -293,6 +292,7 @@
@@ -291,6 +290,10 @@
}
++total;
}
+#else
+ if (*utmp_p->ut_name != '~')
+ ++total;
+#endif
}
endutent();
+#endif
return total;
}

View File

@ -1,11 +0,0 @@
--- local/Makefile.in.orig Sat Apr 20 16:30:13 2002
+++ local/Makefile.in Wed Apr 24 01:45:55 2002
@@ -12,7 +12,7 @@
# local info
#
SNMPCONFPATH=@SNMPCONFPATH@
-PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail
+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail
SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
ipf-mod.pl.made snmpconf.made traptoemail.made
PERLPROG=@PERLPROG@

View File

@ -0,0 +1,138 @@
--- local/fixproc.orig Sat Apr 20 09:30:13 2002
+++ local/fixproc Sat Mar 6 01:59:59 2004
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!%%PERL%%
#
# fixproc [-min n] [-max n] [-check | -kill | -restart | -exist | -fix] proc ...
#
@@ -129,7 +129,7 @@
#
# Timothy Kong 3/1995
-$database_file = '/local/etc/fixproc.conf';
+$database_file = '%%PREFIX%%/etc/fixproc.conf';
$debug = 0; # specify debug level using -dN
# currently defined: -d1
@@ -155,6 +155,14 @@
$shell_header = "#!/bin/sh\n";
$shell_end_marker = 'shell_end_marker';
+open(command, "/bin/ps -p $$ |") || die "$0: can't run ps command\n";
+if (split(' ', <command>) > 4) {
+ $ps_opts = 'ax';
+} else {
+ $ps_opts = '-e';
+}
+close command;
+
&read_args();
&read_database();
# &dump_database(); # debug only
@@ -203,7 +211,9 @@
$i++;
}
close (file);
- system "chmod +x $file";
+ ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
+ $atime,$mtime,$ctime,$blksize,$blocks) = stat($file);
+ chmod $mode | 0111, $file;
return file;
}
@@ -237,8 +247,8 @@
# return code is number divided by 256
$error_code = (system "$tmpfile") / 256;
- system "rm $tmpfile";
- return ($fix_failed_error) if ($error_code != 0);
+ unlink $tmpfile;
+ return ($cannot_fix_error) if ($error_code != 0);
# sleep needed here?
return &do_exist ($proc);
}
@@ -268,7 +278,7 @@
# return code is number divided by 256
$error_code = (system "$tmpfile") / 256;
- system "rm $tmpfile";
+ unlink $tmpfile;
return ($check_failed_error) if ($error_code != 0);
# check passed, continue
@@ -285,10 +295,12 @@
# do ps, check to see if min <= no. of processes <= max
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc | /bin/wc -l |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-wc command\n";
- $proc_count = <command>;
- if (($proc_count < $min{$proc}) || ($proc_count > $max{$proc}))
+ @allprocs = <command>;
+ close command;
+ @procs = grep(/$proc/, @allprocs);
+ if (($#procs < $min{$proc}) || ($#procs > $max{$proc}))
{
return $check_failed_error;
}
@@ -305,41 +317,48 @@
# first try kill
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-awk command\n";
while (<command>)
{
- # match the first field of ps -e
+ if /$proc/ {
+ # match the first field of ps $ps_opts
$! = $fixproc_error;
- /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
- system "kill $1";
+ /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n";
+ kill 15, $1;
+ }
}
+ close command;
# if process still exist, try kill -9
sleep 2;
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-awk command\n";
$second_kill_needed = 0;
while (<command>)
{
- # match the first field of ps -e
+ if /$proc/ {
+ # match the first field of ps $ps_opts
$! = $fixproc_error;
- /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
- system "kill -9 $1";
+ /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n";
+ kill 9, $1;
$second_kill_needed = 1;
+ }
}
+ close command;
return ($no_error) if ($second_kill_needed == 0);
# see if kill -9 worked
sleep 2;
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-awk command\n";
while (<command>)
{ # a process still exist, return error
- return $cannot_kill_error;
+ return $cannot_kill_error if /$proc/;
}
+ close command;
return $no_error; # good, all dead
}

View File

@ -0,0 +1,21 @@
--- local/ipf-mod.pl.orig Thu May 29 05:30:19 2003
+++ local/ipf-mod.pl Thu May 29 05:40:13 2003
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -s
+#!%%PERL%% -s
##
## IP Filter UCD-SNMP pass module
##
@@ -9,10 +9,10 @@
## Date: $ Tue Dec 1 10:24:08 EET 1998 $
## Version: 1.1a
-# Put this file in /usr/local/bin/ipf-mod.pl and then add the following
+# Put this file in %%PREFIX%%/bin/ipf-mod.pl and then add the following
# line to your snmpd.conf file (without the # at the front):
#
-# pass .1.3.6.1.4.1.2021.13.2 /usr/local/bin/ipf-mod.pl
+# pass .1.3.6.1.4.1.2021.13.2 %%PREFIX%%/bin/ipf-mod.pl
# enterprises.ucdavis.ucdExperimental.ipFilter = .1.3.6.1.4.1.2021.13.2
# ipfInTable.ipfInEntry.ipfInIndex integer = 1.1.1

View File

@ -0,0 +1,20 @@
--- local/mib2c.orig Fri Nov 14 02:28:39 2003
+++ local/mib2c Wed Feb 4 09:05:44 2004
@@ -1,5 +1,4 @@
-#!/usr/bin/perl
-#!/usr/bin/perl -w
+#!%%PERL%%
#
# $Id: mib2c,v 5.36 2003/11/14 01:28:39 rstory Exp $
@@ -56,8 +55,8 @@
if($ENV{MIB2C_DIR}) {
push @def_search_dirs, $ENV{MIB2C_DIR};
}
-push @def_search_dirs, "/usr/local/share/snmp/";
-
+push @def_search_dirs, "%%PREFIX%%/share/snmp/";
+push @def_search_dirs, "%%PREFIX%%/etc/snmp/";
sub usage {
print "$0 [-h] [-c configfile] [-f prefix] mibNode\n\n";

View File

@ -0,0 +1,8 @@
--- local/snmpcheck.def.orig Thu May 29 05:28:22 2003
+++ local/snmpcheck.def Thu May 29 05:29:49 2003
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl -w
+#!%%PERL%% -w
use strict 'refs';
require Net::Ping;

View File

@ -0,0 +1,53 @@
--- local/snmpconf.orig Thu May 29 05:30:19 2003
+++ local/snmpconf Thu May 29 05:34:45 2003
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!%%PERL%% -w
#
# A simple configuration file builder based on questions listed in
@@ -16,7 +16,7 @@
%arrayitems=qw(question 1 validanswer 1);
#defaults
-$opts{'c'} = "/usr/local/share/snmp/snmpconf-data";
+$opts{'c'} = "%%PREFIX%%/share/snmp/snmpconf-data";
# read the argument string
getopts("qadhfc:piI:r:R:g:G", \%opts);
@@ -26,7 +26,7 @@
print "$0 [options] [FILETOCREATE...]\n";
print "options:\n";
print " -f overwrite existing files without prompting\n";
- print " -i install created files into /usr/local/share/snmp.\n";
+ print " -i install created files into %%PREFIX%%/share/snmp.\n";
print " -p install created files into $ENV{HOME}/.snmp.\n";
print " -I DIR install created files into DIR.\n";
print " -a Don't ask any questions, just read in current\n";
@@ -62,7 +62,7 @@
#
# Find existing files to possibly read in.
#
-my @searchpath = (qw(/usr/local/share/snmp /usr/local/etc/snmp .), "$ENV{HOME}/.snmp");
+my @searchpath = (qw(%%PREFIX%%/share/snmp %%PREFIX%%/etc/snmp .), "$ENV{HOME}/.snmp");
push @searchpath, $opts{I} if ($opts{I});
foreach my $i (@searchpath) {
debug("searching $i\n");
@@ -159,7 +159,7 @@
foreach my $i (@didfiles) {
if ($didfile{$i} ne "1") {
if ($opts{'i'} || $opts{'I'}) {
- $opts{'I'} = "/usr/local/share/snmp" if (!$opts{'I'});
+ $opts{'I'} = "%%PREFIX%%/share/snmp" if (!$opts{'I'});
system("mv $opts{'I'}/$i $opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i");
system("mv $didfile{$i} $opts{'I'}");
Print(" $didfile{$i} installed in $opts{'I'}\n");
@@ -180,7 +180,7 @@
}
if (!$opts{'p'} && !$opts{'i'} && !$opts{'I'}) {
- Print("\nThese files should be moved to /usr/local/share/snmp/ if you
+ Print("\nThese files should be moved to %%PREFIX%%/share/snmp/ if you
want them used by everyone on the system. In the future, if you add
the -i option to the command line I'll copy them there automatically for you.

View File

@ -0,0 +1,9 @@
--- local/tkmib.orig Thu May 29 05:30:19 2003
+++ local/tkmib Thu May 29 05:31:46 2003
@@ -1,5 +1,4 @@
-#!/usr/bin/perl
-#!/usr/bin/perl -w
+#!%%PERL%% -w
require 5;

View File

@ -0,0 +1,16 @@
--- local/traptoemail.orig Thu May 29 05:30:19 2003
+++ local/traptoemail Thu May 29 05:35:13 2003
@@ -1,11 +1,11 @@
-#!/usr/bin/perl
+#!%%PERL%%
# This is a snmptrapd handler script to convert snmp traps into email
# messages.
# Usage:
# Put a line like the following in your snmptrapd.conf file:
-# traphandle TRAPOID|default /usr/local/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
+# traphandle TRAPOID|default %%PREFIX%%/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
# FROM defaults to "root"
# SMTPSERVER defaults to "localhost"

View File

@ -1,12 +1,14 @@
--- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig Sat Nov 9 23:59:53 2002
+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c Sat Aug 16 17:09:01 2003
@@ -207,11 +207,13 @@
--- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig Sat Nov 9 15:59:53 2002
+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c Sat Feb 21 11:55:05 2004
@@ -204,6 +204,7 @@
if (kd == NULL)
kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, NULL);
+#if !defined(freebsd5)
auto_nlist(NSWDEV_SYMBOL, (char *) &nswdev, sizeof(nswdev));
auto_nlist(DMMAX_SYMBOL, (char *) &dmmax, sizeof(dmmax));
+#if !defined(freebsd5)
sw = (struct swdevt *) malloc(nswdev * sizeof(*sw));
if (sw == NULL)
@@ -212,6 +213,7 @@
return;
auto_nlist(SWDEVT_SYMBOL, (char *) sw, nswdev * sizeof(*sw));

View File

@ -28,8 +28,9 @@ fi
name=snmpd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/snmpd
pidfile='/var/run/snmpd.pid'
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
sig_stop=-KILL
load_rc_config $name
load_rc_config ${name}
run_rc_command "$1"

View File

@ -0,0 +1,35 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: snmptrapd
# REQUIRE: DAEMON
# KEYWORD: FreeBSD
#
# Add the following line to /etc/rc.conf to enable snmptrapd:
#
# snmptrapd_enable="YES"
#
snmptrapd_enable="NO"
snmptrapd_flags="-p /var/run/snmptrapd.pid"
. %%RC_SUBR%%
load_rc_config net_snmptrapd
if [ ! -z "$net_snmptrapd_enable" ]; then
echo "Warning: \$net_snmptrapd_enable is obsoleted."
echo " Use \$snmptrapd_enable instead."
snmptrapd_enable="$net_snmptrapd_enable"
[ ! -z "$net_snmptrapd_flags" ] && snmptrapd_flags="$net_snmptrapd_flags"
fi
name=snmptrapd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
load_rc_config ${name}
run_rc_command "$1"

View File

@ -7,6 +7,6 @@ Various tools relating to the Simple Network Management Protocol including:
tools to request or set information from SNMP agents
tools to generate and handle SNMP traps
a version of the unix 'netstat' command using SNMP
a Tk/perl mib browser
a graphical Perl/Tk/SNMP based mib browser
WWW: http://net-snmp.sourceforge.net/

View File

@ -1,23 +1,26 @@
**** This port installs snmp daemon, include files and libraries but not
invoking snmpd by default.
If you want to invoke snmpd from startup, put these lines into
/etc/rc.conf.
**** This port installs snmp daemon, header files and libraries but don't
invokes snmpd by default.
If you want to invoke snmpd and/or snmptrapd at startup, put these
lines into /etc/rc.conf.
snmpd_enable="YES"
snmpd_flags=""
snmpd_flags="-as -p /var/run/snmpd.pid"
snmptrapd_enable="YES"
snmptrapd_flags="-as -p /var/run/snmptrapd.pid"
**** You can specify make variables as:
**** You may specify the following make variables:
NET_SNMP_SYS_CONTACT="kuriyama@FreeBSD.org"
NET_SNMP_SYS_LOCATION="Tokyo, Japan"
DEFAULT_SNMP_VERSION=3
NET_SNMP_MIB_MODULES="host smux mibII/mta_sendmail ucd-snmp/diskio"
NET_SNMP_LOGFILE=/var/log/snmpd.log
NET_SNMP_PERSISTENTDIR=/var/net-snmp
to define default values (or overwriting defaults). At least
setting first two variables, you will not be prompted during
configuration process. Or you can set
configuration process. You may also set
BATCH="yes"
to make to avoid interactive configuration.
to avoid interactive configuration.

View File

@ -22,8 +22,11 @@ bin/snmptrap
bin/snmpusm
bin/snmpvacm
bin/snmpwalk
%%WITH_TKMIB%%bin/tkmib
bin/traptoemail
etc/rc.d/snmpd.sh
etc/rc.d/snmptrapd.sh
@exec mkdir %D/etc/snmp 2>/dev/null || true
include/net-snmp/agent/agent_callbacks.h
include/net-snmp/agent/agent_handler.h
include/net-snmp/agent/agent_index.h
@ -91,9 +94,9 @@ include/net-snmp/library/snmp-tc.h
include/net-snmp/library/snmp.h
include/net-snmp/library/snmpCallbackDomain.h
include/net-snmp/library/snmpTCPDomain.h
include/net-snmp/library/snmpTCPIPv6Domain.h
%%WITH_IPV6%%include/net-snmp/library/snmpTCPIPv6Domain.h
include/net-snmp/library/snmpUDPDomain.h
include/net-snmp/library/snmpUDPIPv6Domain.h
%%WITH_IPV6%%include/net-snmp/library/snmpUDPIPv6Domain.h
include/net-snmp/library/snmpUnixDomain.h
include/net-snmp/library/snmp_alarm.h
include/net-snmp/library/snmp_api.h
@ -158,152 +161,172 @@ include/net-snmp/types.h
include/net-snmp/utilities.h
include/net-snmp/varbind_api.h
include/net-snmp/version.h
@dirrm include/net-snmp/agent
@dirrm include/net-snmp/library
@dirrm include/net-snmp/machine
@dirrm include/net-snmp/system
@dirrm include/net-snmp
lib/libnetsnmp.a
lib/libnetsnmp.so
lib/libnetsnmp.so.%%shlib%%
lib/libnetsnmp.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmp.so.%%SHLIB_VERSION%% %B/libnetsnmp.so
@unexec rm -f %B/libnetsnmp.so 2> /dev/null || true
lib/libnetsnmpagent.a
lib/libnetsnmpagent.so
lib/libnetsnmpagent.so.%%shlib%%
lib/libnetsnmpagent.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmpagent.so.%%SHLIB_VERSION%% %B/libnetsnmpagent.so
@unexec rm -f %B/libnetsnmpagent.so 2> /dev/null || true
lib/libnetsnmphelpers.a
lib/libnetsnmphelpers.so
lib/libnetsnmphelpers.so.%%shlib%%
lib/libnetsnmphelpers.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmphelpers.so.%%SHLIB_VERSION%% %B/libnetsnmphelpers.so
@unexec rm -f %B/libnetsnmphelpers.so 2> /dev/null || true
lib/libnetsnmpmibs.a
lib/libnetsnmpmibs.so
lib/libnetsnmpmibs.so.%%shlib%%
lib/libnetsnmpmibs.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmpmibs.so.%%SHLIB_VERSION%% %B/libnetsnmpmibs.so
@unexec rm -f %B/libnetsnmpmibs.so 2> /dev/null || true
lib/libnetsnmptrapd.a
lib/libnetsnmptrapd.so
lib/libnetsnmptrapd.so.%%shlib%%
lib/libnetsnmptrapd.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmptrapd.so.%%SHLIB_VERSION%% %B/libnetsnmptrapd.so
@unexec rm -f %B/libnetsnmptrapd.so 2> /dev/null || true
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Bundle/Makefile.subs.pl
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/ASN.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/OID.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/default_store.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/netsnmp_request_infoPtr.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/default_store.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/SNMP.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP/.packlist
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/autosplit.ix
sbin/snmpd
sbin/snmptrapd
share/snmp/mib2c.access_functions.conf
share/snmp/mib2c.array-user.conf
share/snmp/mib2c.check_values.conf
share/snmp/mib2c.check_values_local.conf
share/snmp/mib2c.column_defines.conf
share/snmp/mib2c.column_enums.conf
share/snmp/mib2c.conf
share/snmp/mib2c.create-dataset.conf
share/snmp/mib2c.int_watch.conf
share/snmp/mib2c.iterate.conf
share/snmp/mib2c.iterate_access.conf
share/snmp/mib2c.old-api.conf
share/snmp/mib2c.scalar.conf
share/snmp/mibs/AGENTX-MIB.txt
share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
share/snmp/mibs/EtherLike-MIB.txt
share/snmp/mibs/HCNUM-TC.txt
share/snmp/mibs/HOST-RESOURCES-MIB.txt
share/snmp/mibs/HOST-RESOURCES-TYPES.txt
share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
share/snmp/mibs/IANA-LANGUAGE-MIB.txt
share/snmp/mibs/IANAifType-MIB.txt
share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
share/snmp/mibs/IF-MIB.txt
share/snmp/mibs/INET-ADDRESS-MIB.txt
share/snmp/mibs/IP-FORWARD-MIB.txt
share/snmp/mibs/IP-MIB.txt
share/snmp/mibs/IPV6-ICMP-MIB.txt
share/snmp/mibs/IPV6-MIB.txt
share/snmp/mibs/IPV6-TC.txt
share/snmp/mibs/IPV6-TCP-MIB.txt
share/snmp/mibs/IPV6-UDP-MIB.txt
share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
share/snmp/mibs/NET-SNMP-MIB.txt
share/snmp/mibs/NET-SNMP-TC.txt
share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
share/snmp/mibs/RFC-1215.txt
share/snmp/mibs/RFC1155-SMI.txt
share/snmp/mibs/RFC1213-MIB.txt
share/snmp/mibs/RMON-MIB.txt
share/snmp/mibs/SMUX-MIB.txt
share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
share/snmp/mibs/SNMP-MPD-MIB.txt
share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
share/snmp/mibs/SNMP-PROXY-MIB.txt
share/snmp/mibs/SNMP-TARGET-MIB.txt
share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
share/snmp/mibs/SNMPv2-CONF.txt
share/snmp/mibs/SNMPv2-MIB.txt
share/snmp/mibs/SNMPv2-SMI.txt
share/snmp/mibs/SNMPv2-TC.txt
share/snmp/mibs/SNMPv2-TM.txt
share/snmp/mibs/TCP-MIB.txt
share/snmp/mibs/UCD-DEMO-MIB.txt
share/snmp/mibs/UCD-DISKIO-MIB.txt
share/snmp/mibs/UCD-DLMOD-MIB.txt
share/snmp/mibs/UCD-IPFWACC-MIB.txt
share/snmp/mibs/UCD-SNMP-MIB.txt
share/snmp/mibs/UDP-MIB.txt
@unexec rm -f %D/share/snmp/mibs/.index 2>/dev/null || true
share/snmp/snmpconf-data/snmp-data/authopts
share/snmp/snmpconf-data/snmp-data/debugging
share/snmp/snmpconf-data/snmp-data/mibs
share/snmp/snmpconf-data/snmp-data/output
share/snmp/snmpconf-data/snmp-data/snmpconf-config
share/snmp/snmpconf-data/snmpd-data/acl
share/snmp/snmpconf-data/snmpd-data/basic_setup
share/snmp/snmpconf-data/snmpd-data/extending
share/snmp/snmpconf-data/snmpd-data/monitor
share/snmp/snmpconf-data/snmpd-data/operation
share/snmp/snmpconf-data/snmpd-data/snmpconf-config
share/snmp/snmpconf-data/snmpd-data/system
share/snmp/snmpconf-data/snmpd-data/trapsinks
share/snmp/snmpconf-data/snmptrapd-data/formatting
share/snmp/snmpconf-data/snmptrapd-data/snmpconf-config
share/snmp/snmpconf-data/snmptrapd-data/traphandle
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP/.packlist
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Bundle/Makefile.subs.pl
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/default_store.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/ASN.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/OID.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/netsnmp_request_infoPtr.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/default_store.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/SNMP.pm
@dirrm share/snmp/snmpconf-data/snmp-data
@dirrm share/snmp/snmpconf-data/snmpd-data
@dirrm share/snmp/snmpconf-data/snmptrapd-data
@dirrm share/snmp/snmpconf-data
@dirrm share/snmp/mibs
@unexec rmdir %D/share/snmp 2>/dev/null || true
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle 2>/dev/null || true
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto 2>/dev/null || true
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/Bundle 2>/dev/null || true
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP 2>/dev/null || true
%%PORTDOCS%%%%DOCSDIR%%/AGENT.txt
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/FAQ
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.agentx
%%PORTDOCS%%%%DOCSDIR%%/README.krb5
%%PORTDOCS%%%%DOCSDIR%%/README.snmpv3
%%PORTDOCS%%%%DOCSDIR%%/README.thread
%%PORTDOCS%%%%DOCSDIR%%/README.smux
%%DATADIR%%/mib2c.access_functions.conf
%%DATADIR%%/mib2c.array-user.conf
%%DATADIR%%/mib2c.check_values.conf
%%DATADIR%%/mib2c.check_values_local.conf
%%DATADIR%%/mib2c.column_defines.conf
%%DATADIR%%/mib2c.column_enums.conf
%%DATADIR%%/mib2c.conf
%%DATADIR%%/mib2c.create-dataset.conf
%%DATADIR%%/mib2c.int_watch.conf
%%DATADIR%%/mib2c.iterate.conf
%%DATADIR%%/mib2c.iterate_access.conf
%%DATADIR%%/mib2c.old-api.conf
%%DATADIR%%/mib2c.scalar.conf
%%DATADIR%%/mibs/AGENTX-MIB.txt
%%WITH_EVENT-MIB%%%%DATADIR%%/mibs/DISMAN-EVENT-MIB.txt
%%DATADIR%%/mibs/DISMAN-SCHEDULE-MIB.txt
%%DATADIR%%/mibs/DISMAN-SCRIPT-MIB.txt
%%DATADIR%%/mibs/EtherLike-MIB.txt
%%DATADIR%%/mibs/HCNUM-TC.txt
%%DATADIR%%/mibs/HOST-RESOURCES-MIB.txt
%%DATADIR%%/mibs/HOST-RESOURCES-TYPES.txt
%%DATADIR%%/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
%%DATADIR%%/mibs/IANA-LANGUAGE-MIB.txt
%%DATADIR%%/mibs/IANAifType-MIB.txt
%%DATADIR%%/mibs/IF-INVERTED-STACK-MIB.txt
%%DATADIR%%/mibs/IF-MIB.txt
%%DATADIR%%/mibs/INET-ADDRESS-MIB.txt
%%DATADIR%%/mibs/IP-FORWARD-MIB.txt
%%DATADIR%%/mibs/IP-MIB.txt
%%DATADIR%%/mibs/IPV6-ICMP-MIB.txt
%%DATADIR%%/mibs/IPV6-MIB.txt
%%DATADIR%%/mibs/IPV6-TC.txt
%%DATADIR%%/mibs/IPV6-TCP-MIB.txt
%%DATADIR%%/mibs/IPV6-UDP-MIB.txt
%%WITH_MTA_SENDMAIL%%%%DATADIR%%/mibs/MTA-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-AGENT-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-EXAMPLES-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-TC.txt
%%WITH_MTA_SENDMAIL%%%%DATADIR%%/mibs/NETWORK-SERVICES-MIB.txt
%%DATADIR%%/mibs/NOTIFICATION-LOG-MIB.txt
%%DATADIR%%/mibs/RFC-1215.txt
%%DATADIR%%/mibs/RFC1155-SMI.txt
%%DATADIR%%/mibs/RFC1213-MIB.txt
%%DATADIR%%/mibs/RMON-MIB.txt
%%DATADIR%%/mibs/SMUX-MIB.txt
%%DATADIR%%/mibs/SNMP-COMMUNITY-MIB.txt
%%DATADIR%%/mibs/SNMP-FRAMEWORK-MIB.txt
%%DATADIR%%/mibs/SNMP-MPD-MIB.txt
%%DATADIR%%/mibs/SNMP-NOTIFICATION-MIB.txt
%%DATADIR%%/mibs/SNMP-PROXY-MIB.txt
%%DATADIR%%/mibs/SNMP-TARGET-MIB.txt
%%DATADIR%%/mibs/SNMP-USER-BASED-SM-MIB.txt
%%DATADIR%%/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
%%DATADIR%%/mibs/SNMPv2-CONF.txt
%%DATADIR%%/mibs/SNMPv2-MIB.txt
%%DATADIR%%/mibs/SNMPv2-SMI.txt
%%DATADIR%%/mibs/SNMPv2-TC.txt
%%DATADIR%%/mibs/SNMPv2-TM.txt
%%DATADIR%%/mibs/TCP-MIB.txt
%%DATADIR%%/mibs/UCD-DEMO-MIB.txt
%%DATADIR%%/mibs/UCD-DISKIO-MIB.txt
%%DATADIR%%/mibs/UCD-DLMOD-MIB.txt
%%DATADIR%%/mibs/UCD-IPFWACC-MIB.txt
%%DATADIR%%/mibs/UCD-SNMP-MIB.txt
%%DATADIR%%/mibs/UDP-MIB.txt
@unexec rm -f %D/%%DATADIR%%/mibs/.index 2>/dev/null || true
%%WITH_PERL%%%%DATADIR%%/snmp_perl.pl
%%DATADIR%%/snmpconf-data/snmp-data/authopts
%%DATADIR%%/snmpconf-data/snmp-data/debugging
%%DATADIR%%/snmpconf-data/snmp-data/mibs
%%DATADIR%%/snmpconf-data/snmp-data/output
%%DATADIR%%/snmpconf-data/snmp-data/snmpconf-config
%%DATADIR%%/snmpconf-data/snmpd-data/acl
%%DATADIR%%/snmpconf-data/snmpd-data/basic_setup
%%DATADIR%%/snmpconf-data/snmpd-data/extending
%%DATADIR%%/snmpconf-data/snmpd-data/monitor
%%DATADIR%%/snmpconf-data/snmpd-data/operation
%%DATADIR%%/snmpconf-data/snmpd-data/snmpconf-config
%%DATADIR%%/snmpconf-data/snmpd-data/system
%%DATADIR%%/snmpconf-data/snmpd-data/trapsinks
%%DATADIR%%/snmpconf-data/snmptrapd-data/formatting
%%DATADIR%%/snmpconf-data/snmptrapd-data/snmpconf-config
%%DATADIR%%/snmpconf-data/snmptrapd-data/traphandle
@dirrm %%DATADIR%%/snmpconf-data/snmptrapd-data
@dirrm %%DATADIR%%/snmpconf-data/snmpd-data
@dirrm %%DATADIR%%/snmpconf-data/snmp-data
@dirrm %%DATADIR%%/snmpconf-data
@unexec rmdir %D/%%DATADIR%%/mibs 2>/dev/null || true
@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle 2>/dev/null || true
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto 2>/dev/null || true
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/Bundle 2>/dev/null || true
@dirrm include/net-snmp/system
@dirrm include/net-snmp/machine
@dirrm include/net-snmp/library
@dirrm include/net-snmp/agent
@dirrm include/net-snmp
@unexec rmdir %D/etc/snmp 2>/dev/null || true

View File

@ -5,16 +5,29 @@
# $FreeBSD$
#
PORTNAME= net-snmp
PORTNAME= snmp
PORTVERSION= 5.1
PORTREVISION= 2
PORTREVISION= 3
PKGNAMEPREFIX= net-
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
DISTNAME= ${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION}
.if defined(WITH_INETADDRESS_HACK)
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-snmplib::mib.c
.endif
.if !defined(WITH_TKMIB)
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-local:Makefile.in
.endif
MAINTAINER= kuriyama@FreeBSD.org
COMMENT= An extendable SNMP implementation
.if defined(WITH_TKMIB)
RUN_DEPEND= ${SITE_PERL}/${PERL_ARCH}/Tk.pm:${PORTSDIR}/x11-toolkits/p5-Tk
.endif
USE_REINPLACE= yes
USE_AUTOCONF_VER=257
USE_LIBTOOL= yes
@ -26,27 +39,79 @@ NO_LATEST_LINK= yes
USE_PERL5= yes
.endif
CONFIGURE_ARGS+=--enable-shared --with-mib-modules="${NET_SNMP_MIB_MODULES}" \
CONFIGURE_ENV+= PERLPROG="${PERL}" PSPROG="${PS_CMD}" SED="${SED}"
CONFIGURE_ARGS+=--enable-shared --enable-internal-md5 \
--with-mib-modules="${_NET_SNMP_MIB_MODULES}" \
--with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
--with-sys-contact="${NET_SNMP_SYS_CONTACT}" \
--with-sys-location="${NET_SNMP_SYS_LOCATION}" \
--with-logfile="${NET_SNMP_LOGFILE}" \
--with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat" \
--with-defaults
.if defined(WITHOUT_PERL)
PLIST_SUB+= WITHPERL="@comment "
.else
CONFIGURE_ARGS+= --with-perl-modules
PLIST_SUB+= WITHPERL=""
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat"
.if defined(BATCH)
CONFIGURE_ARGS+=--with-defaults
.endif
.if !defined(WITHOUT_DUMMY_VALUES)
CONFIGURE_ARGS+=--with-dummy-values
.endif
.include <bsd.port.pre.mk>
.if defined(WITHOUT_PERL)
PLIST_SUB+= WITH_PERL="@comment "
.else
CONFIGURE_ARGS+=--enable-embedded-perl --with-perl-modules
PLIST_SUB+= WITH_PERL=""
.endif
.if defined(WITH_TKMIB)
PLIST_SUB+= WITH_TKMIB=""
.else
PLIST_SUB+= WITH_TKMIB="@comment "
.endif
.if ${OSVERSION} >= 400014 && !defined(WITHOUT_IPV6)
CONFIGURE_ARGS+=--enable-ipv6
# --with-transport="UDPIPv6 TCPIPv6" --with-modules=mibII/ipv6"
PLIST_SUB+= WITH_IPV6=""
.else
PLIST_SUB+= WITH_IPV6="@comment "
.endif
SHLIB_VERSION= 6
PLIST_SUB+= SHLIB_VERSION=${SHLIB_VERSION}
LIBTOOL_SUB= LTCONFIG=${LIBTOOL_SHAREDIR}/ltconfig${LIBTOOL_VERSION} \
LTMAIN=${LIBTOOL_SHAREDIR}/ltmain.sh
SCRIPTS_SUB= PREFIX=${PREFIX} PERL=${PERL}
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
DEFAULT_SNMP_VERSION?= 3
NET_SNMP_SYS_CONTACT?= nobody@no.where
NET_SNMP_SYS_LOCATION?=
NET_SNMP_SYS_CONTACT?= nobody@nowhere.invalid
NET_SNMP_SYS_LOCATION?= somewhere
NET_SNMP_LOGFILE?= /var/log/snmpd.log
NET_SNMP_PERSISTENTDIR?=/var/net-snmp
NET_SNMP_MIB_MODULES?= host smux ucd-snmp/diskio
NET_SNMP_MIB_MODULES?= ${NET_SNMP_MIB_MODULE_LIST}
NET_SNMP_MIB_MODULE_LIST=host disman/event-mib smux mibII/mta_sendmail ucd-snmp/diskio
_NET_SNMP_MIB_MODULES=
.for module1 in ${NET_SNMP_MIB_MODULE_LIST}
_module1=${module1}
_define= false
. for module2 in ${NET_SNMP_MIB_MODULES}
_module2=${module2}
. if ${_module1} == ${_module2}
_define= true
. endif
. endfor
. if ${_define} == true
_NET_SNMP_MIB_MODULES+= ${module1}
PLIST_SUB+= WITH_${module1:C|.*/||:U}=""
. else
PLIST_SUB+= WITH_${module1:C|.*/||:U}="@comment "
. endif
.endfor
MAN1= mib2c.1 \
snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 \
@ -86,61 +151,112 @@ MAN3= add_mibdir.3 add_module_replacement.3 default_store.3 \
netsnmp_stash_cache.3 netsnmp_utilities.3
.if !defined(WITHOUT_PERL)
MAN3PERL= NetSNMP::default_store.3 NetSNMP::ASN.3 NetSNMP::OID.3 \
MAN3PERL= NetSNMP::ASN.3 NetSNMP::OID.3 NetSNMP::agent.3 \
NetSNMP::agent::default_store.3 \
NetSNMP::netsnmp_request_infoPtr.3 \
NetSNMP::agent.3 SNMP.3
NetSNMP::default_store.3 \
NetSNMP::netsnmp_request_infoPtr.3 SNMP.3
MAN3PERLPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
_MANPAGES+= ${MAN3PERL:S%^%${MAN3PERLPREFIX}/man/man3/%}
.endif
MAN5= snmp.conf.5 snmp_config.5 snmpd.conf.5 \
snmptrapd.conf.5 variables.5
MAN8= snmpd.8 snmptrapd.8
BIN= snmpbulkwalk snmpget snmpgetnext snmpnetstat snmpset \
BIN_FILES= snmpbulkwalk snmpget snmpgetnext snmpnetstat snmpset \
snmpstatus snmptest snmptranslate snmptrap snmpwalk
SBIN= snmpd snmptrapd
STARTUP_FILE= ${PREFIX}/etc/rc.d/snmpd.sh
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 400014
CONFIGURE_ARGS+=--enable-ipv6 \
--with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix"
SBIN_FILES= snmpd snmptrapd
STARTUP_DIR= ${PREFIX}/etc/rc.d
STARTUP_FILES= snmpd.sh snmptrapd.sh
SCRIPT_FILES= snmpcheck.def mib2c fixproc ipf-mod.pl snmpconf \
traptoemail
.if defined(WITH_TKMIB)
SCRIPT_FILES+= tkmib
.endif
DOC_FILES= AGENT.txt COPYING FAQ NEWS README \
README.agentx README.krb5 README.snmpv3 README.thread \
agent/mibgroup/README.smux
SHLIB_VERSION= 6
PLIST_SUB+= shlib=${SHLIB_VERSION}
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
PS_CMD?= /bin/ps
.if defined(WITH_INETADDRESS_HACK)
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-snmplib::mib.c
.endif
pre-everything::
@${ECHO_MSG}
@${ECHO_MSG} "You may use the following build options:"
@${ECHO_MSG}
@${ECHO_MSG} "WITH_INETADDRESS_HACK=yes builds with the inetaddress hack"
@${ECHO_MSG} "WITH_TKMIB=yes Install a graphical Perl/Tk/SNMP based mib browser"
@${ECHO_MSG} "WITHOUT_DUMMY_VALUES=yes Provide 'placeholder' dummy values where"
@${ECHO_MSG} " the necessary information is not available."
@${ECHO_MSG} "WITHOUT_PERL=yes Install the perl modules along with the rest"
@${ECHO_MSG} " of the net-snmp toolkit."
@${ECHO_MSG} "WITHOUT_IPV6=yes Generate IPv6 ready version."
@${ECHO_MSG}
@${ECHO_MSG} "DEFAULT_SNMP_VERSION=\"3\" Default version of SNMP to use."
@${ECHO_MSG} "NET_SNMP_SYS_CONTACT=\"${NET_SNMP_SYS_CONTACT}\""
@${ECHO_MSG} " Default system contact."
@${ECHO_MSG} "NET_SNMP_SYS_LOCATION=\"${NET_SNMP_SYS_LOCATION}\""
@${ECHO_MSG} " Default system location."
@${ECHO_MSG} "NET_SNMP_LOGFILE=\"${NET_SNMP_LOGFILE}\""
@${ECHO_MSG} " Default log file location for snmpd."
@${ECHO_MSG} "NET_SNMP_PERSISTENTDIR=\"${NET_SNMP_PERSISTENTDIR}\""
@${ECHO_MSG} " Default directory for persistent data storage."
@${ECHO_MSG} "NET_SNMP_MIB_MODULES=\"${NET_SNMP_MIB_MODULE_LIST}\""
@${ECHO_MSG} " Optional mib modules that can be built into the"
@${ECHO_MSG} " agent"
@${ECHO_MSG}
post-patch:
@${REINPLACE_CMD} \
-e 's|%%LTCONFIG%%|${LIBTOOL_SHAREDIR}/ltconfig${LIBTOOL_VERSION}|g' \
-e 's|%%LTMAIN%%|${LIBTOOL_SHAREDIR}/ltmain.sh|g' \
post-patch: patch-autoconf patch-script-files patch-startup-files
patch-autoconf:
@${REINPLACE_CMD} ${LIBTOOL_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/aclocal.m4
patch-script-files:
.for file in ${SCRIPT_FILES}
@${REINPLACE_CMD} ${SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/local/${file}
.endfor
patch-startup-files:
.for file in ${STARTUP_FILES}
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/${file}.sample > ${WRKDIR}/${file}
.endfor
post-configure:
@${FIND} ${WRKSRC} -name Makefile | \
${XARGS} ${PERL} -pi -e 's|$$| -m 755| if /^INSTALL\s+=/'
.if !defined(WITHOUT_PERL)
post-build:
@${FIND} ${CONFIGURE_WRKSRC}/perl -name Makefile | \
${XARGS} ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//'
${FIND} ${WRKSRC}/perl -name Makefile | \
${XARGS} ${PERL} -pi -e '\
s!^(PREFIX) = /usr/local!$$1 = ${PREFIX}!; \
s!^(INSTALLMAN3DIR) = /usr/local!$$1 = \$$\(PREFIX\)!; \
s! doc_(perl|site|\$$\(INSTALLDIRS\))_install$$!!; \
'
.endif
pre-install:
-@[ -f ${STARTUP_FILE} ] && \
(${ECHO} "Remove old ${STARTUP_FILE} before install." && exit 1)
post-install: strip-files install-startup-files install-doc-files display-message
post-install:
@( cd ${PREFIX}/bin && ${STRIP_CMD} ${BIN} )
@( cd ${PREFIX}/sbin && ${STRIP_CMD} ${SBIN} )
@${FIND} ${PREFIX}/include/net-snmp ${PREFIX}/share/snmp/mibs -type f \
| ${XARGS} ${CHMOD} 644
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/snmpd.sh.sample > ${STARTUP_FILE}
@${CHMOD} 755 ${STARTUP_FILE}
strip-files:
@cd ${PREFIX}/bin; ${STRIP_CMD} ${BIN_FILES}
@cd ${PREFIX}/sbin; ${STRIP_CMD} ${SBIN_FILES}
install-startup-files:
.for file in ${STARTUP_FILES}
@${INSTALL_SCRIPT} ${WRKDIR}/${file} ${STARTUP_DIR}
.endfor
install-doc-files:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
. for file in ${DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
. endfor
.endif
display-message:
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}

View File

@ -0,0 +1,11 @@
--- local/Makefile.in.orig Sat Apr 20 16:30:13 2002
+++ local/Makefile.in Wed Apr 24 01:45:55 2002
@@ -12,7 +12,7 @@
# local info
#
SNMPCONFPATH=@SNMPCONFPATH@
-PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail
+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail
SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
ipf-mod.pl.made snmpconf.made traptoemail.made
PERLPROG=@PERLPROG@

View File

@ -1,19 +1,47 @@
--- configure.in.orig Fri Nov 14 13:32:10 2003
+++ configure.in Fri Nov 14 13:36:27 2003
@@ -1357,7 +1357,7 @@
# fall back
--- configure.in.orig Thu Mar 6 07:41:13 2003
+++ configure.in Tue May 27 14:53:22 2003
@@ -1246,7 +1246,7 @@
dnl fall back
CFLAG="-f"
fi
-for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel
+for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel
+for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel /dev/null
do
if test -f $i -o $CFLAG $i; then
ac_cv_KERNEL_LOC="$i"
@@ -1376,6 +1376,7 @@
# Check for mount table location
#
@@ -1659,7 +1659,7 @@
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(stdarg.h string.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h netinet/ip.h netinet/ip_icmp.h net/if.h netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h sys/vm.h vm/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h linux/tasks.h pwd.h grp.h utmpx.h)
# FreeBSD required headers
-AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h machine/types.h sys/socketvar.h)
+AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h sys/socketvar.h)
# Linux
AC_CHECK_HEADERS(sys/conf.h netinet/in_systm.h netinet/tcp.h netinet/udp.h netinet/in_var.h netinet/if_ether.h netinet/ip_var.h netinet/tcp_timer.h netinet/tcp_var.h netinet/tcp_fsm.h netinet/udp_var.h netinet/icmp_var.h sys/protosw.h nlist.h ioctls.h asm/page.h netipx/ipx.h)
# NetBSD required headers
@@ -1866,6 +1866,26 @@
dnl checking for 4.3 vs 4.4 rtentry.
AC_CACHE_CHECK(type of rtentry structure,ac_cv_RTENTRY_TYPE,
[
+
+dnl 4.4 compatible but renamed on FreeBSD
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#define KERNEL
+#define _KERNEL
+#include <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#include <net/route.h>
+],[
+
+#ifndef STRUCT_RTENTRY_HAS_RT_DST
+#define rt_dst rt_nodes->rn_key
+#endif
+
+ struct rtentry rt;
+ rt.rt_nodes[0].rn_bit = 1;
+ rt.rt_dst;
+ ], ac_cv_RTENTRY_TYPE="BSD-4.4")
+# kuriyama: should /var/db/mounttab be used?
AC_CACHE_CHECK(for mount table location,ac_cv_ETC_MNTTAB,
[ac_cv_ETC_MNTTAB="unknown"
for i in /etc/mnttab /etc/mtab /etc/filesystems
dnl 4.4 compat
AC_TRY_COMPILE([

View File

@ -24,7 +24,7 @@
#elif defined(MBSTAT_SYMBOL)
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
long_return = mbstat.m_mbufs;
+#elif __FreeBSD_version < 500024
+#elif defined(freebsd5) && __FreeBSD_version < 500024
+ /* mbuf stats disabled */
+ return NULL;
+#else
@ -40,7 +40,7 @@
#elif defined(MBSTAT_SYMBOL)
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */
+#elif __FreeBSD_version < 500024
+#elif defined(freebsd5) && __FreeBSD_version < 500024
+ /* mbuf stats disabled */
+ return NULL;
+#else

View File

@ -1,23 +1,21 @@
--- agent/mibgroup/host/hr_system.c.orig Fri Nov 14 14:45:55 2003
+++ agent/mibgroup/host/hr_system.c Fri Nov 14 14:46:01 2003
@@ -276,11 +276,10 @@
struct utmp *utmp_p;
#endif
+#ifndef UTMP_HAS_NO_TYPE
setutent();
--- agent/mibgroup/host/hr_system.c.orig Sat Mar 1 05:35:13 2003
+++ agent/mibgroup/host/hr_system.c Sun Feb 8 17:39:50 2004
@@ -280,7 +280,6 @@
while ((utmp_p = getutent()) != NULL) {
-#ifndef UTMP_HAS_NO_TYPE
#ifndef UTMP_HAS_NO_TYPE
if (utmp_p->ut_type == USER_PROCESS) {
-#endif
/* This block of code fixes zombie user PIDs in the
utmp/utmpx file that would otherwise be counted as a
current user */
@@ -293,6 +292,7 @@
@@ -291,6 +290,10 @@
}
++total;
}
+#else
+ if (*utmp_p->ut_name != '~')
+ ++total;
+#endif
}
endutent();
+#endif
return total;
}

View File

@ -1,11 +0,0 @@
--- local/Makefile.in.orig Sat Apr 20 16:30:13 2002
+++ local/Makefile.in Wed Apr 24 01:45:55 2002
@@ -12,7 +12,7 @@
# local info
#
SNMPCONFPATH=@SNMPCONFPATH@
-PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail
+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail
SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
ipf-mod.pl.made snmpconf.made traptoemail.made
PERLPROG=@PERLPROG@

View File

@ -0,0 +1,138 @@
--- local/fixproc.orig Sat Apr 20 09:30:13 2002
+++ local/fixproc Sat Mar 6 01:59:59 2004
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!%%PERL%%
#
# fixproc [-min n] [-max n] [-check | -kill | -restart | -exist | -fix] proc ...
#
@@ -129,7 +129,7 @@
#
# Timothy Kong 3/1995
-$database_file = '/local/etc/fixproc.conf';
+$database_file = '%%PREFIX%%/etc/fixproc.conf';
$debug = 0; # specify debug level using -dN
# currently defined: -d1
@@ -155,6 +155,14 @@
$shell_header = "#!/bin/sh\n";
$shell_end_marker = 'shell_end_marker';
+open(command, "/bin/ps -p $$ |") || die "$0: can't run ps command\n";
+if (split(' ', <command>) > 4) {
+ $ps_opts = 'ax';
+} else {
+ $ps_opts = '-e';
+}
+close command;
+
&read_args();
&read_database();
# &dump_database(); # debug only
@@ -203,7 +211,9 @@
$i++;
}
close (file);
- system "chmod +x $file";
+ ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
+ $atime,$mtime,$ctime,$blksize,$blocks) = stat($file);
+ chmod $mode | 0111, $file;
return file;
}
@@ -237,8 +247,8 @@
# return code is number divided by 256
$error_code = (system "$tmpfile") / 256;
- system "rm $tmpfile";
- return ($fix_failed_error) if ($error_code != 0);
+ unlink $tmpfile;
+ return ($cannot_fix_error) if ($error_code != 0);
# sleep needed here?
return &do_exist ($proc);
}
@@ -268,7 +278,7 @@
# return code is number divided by 256
$error_code = (system "$tmpfile") / 256;
- system "rm $tmpfile";
+ unlink $tmpfile;
return ($check_failed_error) if ($error_code != 0);
# check passed, continue
@@ -285,10 +295,12 @@
# do ps, check to see if min <= no. of processes <= max
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc | /bin/wc -l |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-wc command\n";
- $proc_count = <command>;
- if (($proc_count < $min{$proc}) || ($proc_count > $max{$proc}))
+ @allprocs = <command>;
+ close command;
+ @procs = grep(/$proc/, @allprocs);
+ if (($#procs < $min{$proc}) || ($#procs > $max{$proc}))
{
return $check_failed_error;
}
@@ -305,41 +317,48 @@
# first try kill
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-awk command\n";
while (<command>)
{
- # match the first field of ps -e
+ if /$proc/ {
+ # match the first field of ps $ps_opts
$! = $fixproc_error;
- /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
- system "kill $1";
+ /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n";
+ kill 15, $1;
+ }
}
+ close command;
# if process still exist, try kill -9
sleep 2;
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-awk command\n";
$second_kill_needed = 0;
while (<command>)
{
- # match the first field of ps -e
+ if /$proc/ {
+ # match the first field of ps $ps_opts
$! = $fixproc_error;
- /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
- system "kill -9 $1";
+ /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n";
+ kill 9, $1;
$second_kill_needed = 1;
+ }
}
+ close command;
return ($no_error) if ($second_kill_needed == 0);
# see if kill -9 worked
sleep 2;
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-awk command\n";
while (<command>)
{ # a process still exist, return error
- return $cannot_kill_error;
+ return $cannot_kill_error if /$proc/;
}
+ close command;
return $no_error; # good, all dead
}

View File

@ -0,0 +1,21 @@
--- local/ipf-mod.pl.orig Thu May 29 05:30:19 2003
+++ local/ipf-mod.pl Thu May 29 05:40:13 2003
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -s
+#!%%PERL%% -s
##
## IP Filter UCD-SNMP pass module
##
@@ -9,10 +9,10 @@
## Date: $ Tue Dec 1 10:24:08 EET 1998 $
## Version: 1.1a
-# Put this file in /usr/local/bin/ipf-mod.pl and then add the following
+# Put this file in %%PREFIX%%/bin/ipf-mod.pl and then add the following
# line to your snmpd.conf file (without the # at the front):
#
-# pass .1.3.6.1.4.1.2021.13.2 /usr/local/bin/ipf-mod.pl
+# pass .1.3.6.1.4.1.2021.13.2 %%PREFIX%%/bin/ipf-mod.pl
# enterprises.ucdavis.ucdExperimental.ipFilter = .1.3.6.1.4.1.2021.13.2
# ipfInTable.ipfInEntry.ipfInIndex integer = 1.1.1

View File

@ -0,0 +1,20 @@
--- local/mib2c.orig Fri Nov 14 02:28:39 2003
+++ local/mib2c Wed Feb 4 09:05:44 2004
@@ -1,5 +1,4 @@
-#!/usr/bin/perl
-#!/usr/bin/perl -w
+#!%%PERL%%
#
# $Id: mib2c,v 5.36 2003/11/14 01:28:39 rstory Exp $
@@ -56,8 +55,8 @@
if($ENV{MIB2C_DIR}) {
push @def_search_dirs, $ENV{MIB2C_DIR};
}
-push @def_search_dirs, "/usr/local/share/snmp/";
-
+push @def_search_dirs, "%%PREFIX%%/share/snmp/";
+push @def_search_dirs, "%%PREFIX%%/etc/snmp/";
sub usage {
print "$0 [-h] [-c configfile] [-f prefix] mibNode\n\n";

View File

@ -0,0 +1,8 @@
--- local/snmpcheck.def.orig Thu May 29 05:28:22 2003
+++ local/snmpcheck.def Thu May 29 05:29:49 2003
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl -w
+#!%%PERL%% -w
use strict 'refs';
require Net::Ping;

View File

@ -0,0 +1,53 @@
--- local/snmpconf.orig Thu May 29 05:30:19 2003
+++ local/snmpconf Thu May 29 05:34:45 2003
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!%%PERL%% -w
#
# A simple configuration file builder based on questions listed in
@@ -16,7 +16,7 @@
%arrayitems=qw(question 1 validanswer 1);
#defaults
-$opts{'c'} = "/usr/local/share/snmp/snmpconf-data";
+$opts{'c'} = "%%PREFIX%%/share/snmp/snmpconf-data";
# read the argument string
getopts("qadhfc:piI:r:R:g:G", \%opts);
@@ -26,7 +26,7 @@
print "$0 [options] [FILETOCREATE...]\n";
print "options:\n";
print " -f overwrite existing files without prompting\n";
- print " -i install created files into /usr/local/share/snmp.\n";
+ print " -i install created files into %%PREFIX%%/share/snmp.\n";
print " -p install created files into $ENV{HOME}/.snmp.\n";
print " -I DIR install created files into DIR.\n";
print " -a Don't ask any questions, just read in current\n";
@@ -62,7 +62,7 @@
#
# Find existing files to possibly read in.
#
-my @searchpath = (qw(/usr/local/share/snmp /usr/local/etc/snmp .), "$ENV{HOME}/.snmp");
+my @searchpath = (qw(%%PREFIX%%/share/snmp %%PREFIX%%/etc/snmp .), "$ENV{HOME}/.snmp");
push @searchpath, $opts{I} if ($opts{I});
foreach my $i (@searchpath) {
debug("searching $i\n");
@@ -159,7 +159,7 @@
foreach my $i (@didfiles) {
if ($didfile{$i} ne "1") {
if ($opts{'i'} || $opts{'I'}) {
- $opts{'I'} = "/usr/local/share/snmp" if (!$opts{'I'});
+ $opts{'I'} = "%%PREFIX%%/share/snmp" if (!$opts{'I'});
system("mv $opts{'I'}/$i $opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i");
system("mv $didfile{$i} $opts{'I'}");
Print(" $didfile{$i} installed in $opts{'I'}\n");
@@ -180,7 +180,7 @@
}
if (!$opts{'p'} && !$opts{'i'} && !$opts{'I'}) {
- Print("\nThese files should be moved to /usr/local/share/snmp/ if you
+ Print("\nThese files should be moved to %%PREFIX%%/share/snmp/ if you
want them used by everyone on the system. In the future, if you add
the -i option to the command line I'll copy them there automatically for you.

View File

@ -0,0 +1,9 @@
--- local/tkmib.orig Thu May 29 05:30:19 2003
+++ local/tkmib Thu May 29 05:31:46 2003
@@ -1,5 +1,4 @@
-#!/usr/bin/perl
-#!/usr/bin/perl -w
+#!%%PERL%% -w
require 5;

View File

@ -0,0 +1,16 @@
--- local/traptoemail.orig Thu May 29 05:30:19 2003
+++ local/traptoemail Thu May 29 05:35:13 2003
@@ -1,11 +1,11 @@
-#!/usr/bin/perl
+#!%%PERL%%
# This is a snmptrapd handler script to convert snmp traps into email
# messages.
# Usage:
# Put a line like the following in your snmptrapd.conf file:
-# traphandle TRAPOID|default /usr/local/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
+# traphandle TRAPOID|default %%PREFIX%%/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
# FROM defaults to "root"
# SMTPSERVER defaults to "localhost"

View File

@ -1,12 +1,14 @@
--- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig Sat Nov 9 23:59:53 2002
+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c Sat Aug 16 17:09:01 2003
@@ -207,11 +207,13 @@
--- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig Sat Nov 9 15:59:53 2002
+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c Sat Feb 21 11:55:05 2004
@@ -204,6 +204,7 @@
if (kd == NULL)
kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, NULL);
+#if !defined(freebsd5)
auto_nlist(NSWDEV_SYMBOL, (char *) &nswdev, sizeof(nswdev));
auto_nlist(DMMAX_SYMBOL, (char *) &dmmax, sizeof(dmmax));
+#if !defined(freebsd5)
sw = (struct swdevt *) malloc(nswdev * sizeof(*sw));
if (sw == NULL)
@@ -212,6 +213,7 @@
return;
auto_nlist(SWDEVT_SYMBOL, (char *) sw, nswdev * sizeof(*sw));

View File

@ -28,8 +28,9 @@ fi
name=snmpd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/snmpd
pidfile='/var/run/snmpd.pid'
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
sig_stop=-KILL
load_rc_config $name
load_rc_config ${name}
run_rc_command "$1"

View File

@ -0,0 +1,35 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: snmptrapd
# REQUIRE: DAEMON
# KEYWORD: FreeBSD
#
# Add the following line to /etc/rc.conf to enable snmptrapd:
#
# snmptrapd_enable="YES"
#
snmptrapd_enable="NO"
snmptrapd_flags="-p /var/run/snmptrapd.pid"
. %%RC_SUBR%%
load_rc_config net_snmptrapd
if [ ! -z "$net_snmptrapd_enable" ]; then
echo "Warning: \$net_snmptrapd_enable is obsoleted."
echo " Use \$snmptrapd_enable instead."
snmptrapd_enable="$net_snmptrapd_enable"
[ ! -z "$net_snmptrapd_flags" ] && snmptrapd_flags="$net_snmptrapd_flags"
fi
name=snmptrapd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
load_rc_config ${name}
run_rc_command "$1"

View File

@ -7,6 +7,6 @@ Various tools relating to the Simple Network Management Protocol including:
tools to request or set information from SNMP agents
tools to generate and handle SNMP traps
a version of the unix 'netstat' command using SNMP
a Tk/perl mib browser
a graphical Perl/Tk/SNMP based mib browser
WWW: http://net-snmp.sourceforge.net/

View File

@ -1,23 +1,26 @@
**** This port installs snmp daemon, include files and libraries but not
invoking snmpd by default.
If you want to invoke snmpd from startup, put these lines into
/etc/rc.conf.
**** This port installs snmp daemon, header files and libraries but don't
invokes snmpd by default.
If you want to invoke snmpd and/or snmptrapd at startup, put these
lines into /etc/rc.conf.
snmpd_enable="YES"
snmpd_flags=""
snmpd_flags="-as -p /var/run/snmpd.pid"
snmptrapd_enable="YES"
snmptrapd_flags="-as -p /var/run/snmptrapd.pid"
**** You can specify make variables as:
**** You may specify the following make variables:
NET_SNMP_SYS_CONTACT="kuriyama@FreeBSD.org"
NET_SNMP_SYS_LOCATION="Tokyo, Japan"
DEFAULT_SNMP_VERSION=3
NET_SNMP_MIB_MODULES="host smux mibII/mta_sendmail ucd-snmp/diskio"
NET_SNMP_LOGFILE=/var/log/snmpd.log
NET_SNMP_PERSISTENTDIR=/var/net-snmp
to define default values (or overwriting defaults). At least
setting first two variables, you will not be prompted during
configuration process. Or you can set
configuration process. You may also set
BATCH="yes"
to make to avoid interactive configuration.
to avoid interactive configuration.

View File

@ -22,8 +22,11 @@ bin/snmptrap
bin/snmpusm
bin/snmpvacm
bin/snmpwalk
%%WITH_TKMIB%%bin/tkmib
bin/traptoemail
etc/rc.d/snmpd.sh
etc/rc.d/snmptrapd.sh
@exec mkdir %D/etc/snmp 2>/dev/null || true
include/net-snmp/agent/agent_callbacks.h
include/net-snmp/agent/agent_handler.h
include/net-snmp/agent/agent_index.h
@ -91,9 +94,9 @@ include/net-snmp/library/snmp-tc.h
include/net-snmp/library/snmp.h
include/net-snmp/library/snmpCallbackDomain.h
include/net-snmp/library/snmpTCPDomain.h
include/net-snmp/library/snmpTCPIPv6Domain.h
%%WITH_IPV6%%include/net-snmp/library/snmpTCPIPv6Domain.h
include/net-snmp/library/snmpUDPDomain.h
include/net-snmp/library/snmpUDPIPv6Domain.h
%%WITH_IPV6%%include/net-snmp/library/snmpUDPIPv6Domain.h
include/net-snmp/library/snmpUnixDomain.h
include/net-snmp/library/snmp_alarm.h
include/net-snmp/library/snmp_api.h
@ -158,152 +161,172 @@ include/net-snmp/types.h
include/net-snmp/utilities.h
include/net-snmp/varbind_api.h
include/net-snmp/version.h
@dirrm include/net-snmp/agent
@dirrm include/net-snmp/library
@dirrm include/net-snmp/machine
@dirrm include/net-snmp/system
@dirrm include/net-snmp
lib/libnetsnmp.a
lib/libnetsnmp.so
lib/libnetsnmp.so.%%shlib%%
lib/libnetsnmp.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmp.so.%%SHLIB_VERSION%% %B/libnetsnmp.so
@unexec rm -f %B/libnetsnmp.so 2> /dev/null || true
lib/libnetsnmpagent.a
lib/libnetsnmpagent.so
lib/libnetsnmpagent.so.%%shlib%%
lib/libnetsnmpagent.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmpagent.so.%%SHLIB_VERSION%% %B/libnetsnmpagent.so
@unexec rm -f %B/libnetsnmpagent.so 2> /dev/null || true
lib/libnetsnmphelpers.a
lib/libnetsnmphelpers.so
lib/libnetsnmphelpers.so.%%shlib%%
lib/libnetsnmphelpers.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmphelpers.so.%%SHLIB_VERSION%% %B/libnetsnmphelpers.so
@unexec rm -f %B/libnetsnmphelpers.so 2> /dev/null || true
lib/libnetsnmpmibs.a
lib/libnetsnmpmibs.so
lib/libnetsnmpmibs.so.%%shlib%%
lib/libnetsnmpmibs.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmpmibs.so.%%SHLIB_VERSION%% %B/libnetsnmpmibs.so
@unexec rm -f %B/libnetsnmpmibs.so 2> /dev/null || true
lib/libnetsnmptrapd.a
lib/libnetsnmptrapd.so
lib/libnetsnmptrapd.so.%%shlib%%
lib/libnetsnmptrapd.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmptrapd.so.%%SHLIB_VERSION%% %B/libnetsnmptrapd.so
@unexec rm -f %B/libnetsnmptrapd.so 2> /dev/null || true
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Bundle/Makefile.subs.pl
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/ASN.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/OID.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/default_store.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/netsnmp_request_infoPtr.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/default_store.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/SNMP.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP/.packlist
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/autosplit.ix
sbin/snmpd
sbin/snmptrapd
share/snmp/mib2c.access_functions.conf
share/snmp/mib2c.array-user.conf
share/snmp/mib2c.check_values.conf
share/snmp/mib2c.check_values_local.conf
share/snmp/mib2c.column_defines.conf
share/snmp/mib2c.column_enums.conf
share/snmp/mib2c.conf
share/snmp/mib2c.create-dataset.conf
share/snmp/mib2c.int_watch.conf
share/snmp/mib2c.iterate.conf
share/snmp/mib2c.iterate_access.conf
share/snmp/mib2c.old-api.conf
share/snmp/mib2c.scalar.conf
share/snmp/mibs/AGENTX-MIB.txt
share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
share/snmp/mibs/EtherLike-MIB.txt
share/snmp/mibs/HCNUM-TC.txt
share/snmp/mibs/HOST-RESOURCES-MIB.txt
share/snmp/mibs/HOST-RESOURCES-TYPES.txt
share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
share/snmp/mibs/IANA-LANGUAGE-MIB.txt
share/snmp/mibs/IANAifType-MIB.txt
share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
share/snmp/mibs/IF-MIB.txt
share/snmp/mibs/INET-ADDRESS-MIB.txt
share/snmp/mibs/IP-FORWARD-MIB.txt
share/snmp/mibs/IP-MIB.txt
share/snmp/mibs/IPV6-ICMP-MIB.txt
share/snmp/mibs/IPV6-MIB.txt
share/snmp/mibs/IPV6-TC.txt
share/snmp/mibs/IPV6-TCP-MIB.txt
share/snmp/mibs/IPV6-UDP-MIB.txt
share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
share/snmp/mibs/NET-SNMP-MIB.txt
share/snmp/mibs/NET-SNMP-TC.txt
share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
share/snmp/mibs/RFC-1215.txt
share/snmp/mibs/RFC1155-SMI.txt
share/snmp/mibs/RFC1213-MIB.txt
share/snmp/mibs/RMON-MIB.txt
share/snmp/mibs/SMUX-MIB.txt
share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
share/snmp/mibs/SNMP-MPD-MIB.txt
share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
share/snmp/mibs/SNMP-PROXY-MIB.txt
share/snmp/mibs/SNMP-TARGET-MIB.txt
share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
share/snmp/mibs/SNMPv2-CONF.txt
share/snmp/mibs/SNMPv2-MIB.txt
share/snmp/mibs/SNMPv2-SMI.txt
share/snmp/mibs/SNMPv2-TC.txt
share/snmp/mibs/SNMPv2-TM.txt
share/snmp/mibs/TCP-MIB.txt
share/snmp/mibs/UCD-DEMO-MIB.txt
share/snmp/mibs/UCD-DISKIO-MIB.txt
share/snmp/mibs/UCD-DLMOD-MIB.txt
share/snmp/mibs/UCD-IPFWACC-MIB.txt
share/snmp/mibs/UCD-SNMP-MIB.txt
share/snmp/mibs/UDP-MIB.txt
@unexec rm -f %D/share/snmp/mibs/.index 2>/dev/null || true
share/snmp/snmpconf-data/snmp-data/authopts
share/snmp/snmpconf-data/snmp-data/debugging
share/snmp/snmpconf-data/snmp-data/mibs
share/snmp/snmpconf-data/snmp-data/output
share/snmp/snmpconf-data/snmp-data/snmpconf-config
share/snmp/snmpconf-data/snmpd-data/acl
share/snmp/snmpconf-data/snmpd-data/basic_setup
share/snmp/snmpconf-data/snmpd-data/extending
share/snmp/snmpconf-data/snmpd-data/monitor
share/snmp/snmpconf-data/snmpd-data/operation
share/snmp/snmpconf-data/snmpd-data/snmpconf-config
share/snmp/snmpconf-data/snmpd-data/system
share/snmp/snmpconf-data/snmpd-data/trapsinks
share/snmp/snmpconf-data/snmptrapd-data/formatting
share/snmp/snmpconf-data/snmptrapd-data/snmpconf-config
share/snmp/snmpconf-data/snmptrapd-data/traphandle
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP/.packlist
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Bundle/Makefile.subs.pl
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/default_store.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/ASN.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/OID.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/netsnmp_request_infoPtr.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/default_store.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/SNMP.pm
@dirrm share/snmp/snmpconf-data/snmp-data
@dirrm share/snmp/snmpconf-data/snmpd-data
@dirrm share/snmp/snmpconf-data/snmptrapd-data
@dirrm share/snmp/snmpconf-data
@dirrm share/snmp/mibs
@unexec rmdir %D/share/snmp 2>/dev/null || true
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle 2>/dev/null || true
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto 2>/dev/null || true
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/Bundle 2>/dev/null || true
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP 2>/dev/null || true
%%PORTDOCS%%%%DOCSDIR%%/AGENT.txt
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/FAQ
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.agentx
%%PORTDOCS%%%%DOCSDIR%%/README.krb5
%%PORTDOCS%%%%DOCSDIR%%/README.snmpv3
%%PORTDOCS%%%%DOCSDIR%%/README.thread
%%PORTDOCS%%%%DOCSDIR%%/README.smux
%%DATADIR%%/mib2c.access_functions.conf
%%DATADIR%%/mib2c.array-user.conf
%%DATADIR%%/mib2c.check_values.conf
%%DATADIR%%/mib2c.check_values_local.conf
%%DATADIR%%/mib2c.column_defines.conf
%%DATADIR%%/mib2c.column_enums.conf
%%DATADIR%%/mib2c.conf
%%DATADIR%%/mib2c.create-dataset.conf
%%DATADIR%%/mib2c.int_watch.conf
%%DATADIR%%/mib2c.iterate.conf
%%DATADIR%%/mib2c.iterate_access.conf
%%DATADIR%%/mib2c.old-api.conf
%%DATADIR%%/mib2c.scalar.conf
%%DATADIR%%/mibs/AGENTX-MIB.txt
%%WITH_EVENT-MIB%%%%DATADIR%%/mibs/DISMAN-EVENT-MIB.txt
%%DATADIR%%/mibs/DISMAN-SCHEDULE-MIB.txt
%%DATADIR%%/mibs/DISMAN-SCRIPT-MIB.txt
%%DATADIR%%/mibs/EtherLike-MIB.txt
%%DATADIR%%/mibs/HCNUM-TC.txt
%%DATADIR%%/mibs/HOST-RESOURCES-MIB.txt
%%DATADIR%%/mibs/HOST-RESOURCES-TYPES.txt
%%DATADIR%%/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
%%DATADIR%%/mibs/IANA-LANGUAGE-MIB.txt
%%DATADIR%%/mibs/IANAifType-MIB.txt
%%DATADIR%%/mibs/IF-INVERTED-STACK-MIB.txt
%%DATADIR%%/mibs/IF-MIB.txt
%%DATADIR%%/mibs/INET-ADDRESS-MIB.txt
%%DATADIR%%/mibs/IP-FORWARD-MIB.txt
%%DATADIR%%/mibs/IP-MIB.txt
%%DATADIR%%/mibs/IPV6-ICMP-MIB.txt
%%DATADIR%%/mibs/IPV6-MIB.txt
%%DATADIR%%/mibs/IPV6-TC.txt
%%DATADIR%%/mibs/IPV6-TCP-MIB.txt
%%DATADIR%%/mibs/IPV6-UDP-MIB.txt
%%WITH_MTA_SENDMAIL%%%%DATADIR%%/mibs/MTA-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-AGENT-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-EXAMPLES-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-TC.txt
%%WITH_MTA_SENDMAIL%%%%DATADIR%%/mibs/NETWORK-SERVICES-MIB.txt
%%DATADIR%%/mibs/NOTIFICATION-LOG-MIB.txt
%%DATADIR%%/mibs/RFC-1215.txt
%%DATADIR%%/mibs/RFC1155-SMI.txt
%%DATADIR%%/mibs/RFC1213-MIB.txt
%%DATADIR%%/mibs/RMON-MIB.txt
%%DATADIR%%/mibs/SMUX-MIB.txt
%%DATADIR%%/mibs/SNMP-COMMUNITY-MIB.txt
%%DATADIR%%/mibs/SNMP-FRAMEWORK-MIB.txt
%%DATADIR%%/mibs/SNMP-MPD-MIB.txt
%%DATADIR%%/mibs/SNMP-NOTIFICATION-MIB.txt
%%DATADIR%%/mibs/SNMP-PROXY-MIB.txt
%%DATADIR%%/mibs/SNMP-TARGET-MIB.txt
%%DATADIR%%/mibs/SNMP-USER-BASED-SM-MIB.txt
%%DATADIR%%/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
%%DATADIR%%/mibs/SNMPv2-CONF.txt
%%DATADIR%%/mibs/SNMPv2-MIB.txt
%%DATADIR%%/mibs/SNMPv2-SMI.txt
%%DATADIR%%/mibs/SNMPv2-TC.txt
%%DATADIR%%/mibs/SNMPv2-TM.txt
%%DATADIR%%/mibs/TCP-MIB.txt
%%DATADIR%%/mibs/UCD-DEMO-MIB.txt
%%DATADIR%%/mibs/UCD-DISKIO-MIB.txt
%%DATADIR%%/mibs/UCD-DLMOD-MIB.txt
%%DATADIR%%/mibs/UCD-IPFWACC-MIB.txt
%%DATADIR%%/mibs/UCD-SNMP-MIB.txt
%%DATADIR%%/mibs/UDP-MIB.txt
@unexec rm -f %D/%%DATADIR%%/mibs/.index 2>/dev/null || true
%%WITH_PERL%%%%DATADIR%%/snmp_perl.pl
%%DATADIR%%/snmpconf-data/snmp-data/authopts
%%DATADIR%%/snmpconf-data/snmp-data/debugging
%%DATADIR%%/snmpconf-data/snmp-data/mibs
%%DATADIR%%/snmpconf-data/snmp-data/output
%%DATADIR%%/snmpconf-data/snmp-data/snmpconf-config
%%DATADIR%%/snmpconf-data/snmpd-data/acl
%%DATADIR%%/snmpconf-data/snmpd-data/basic_setup
%%DATADIR%%/snmpconf-data/snmpd-data/extending
%%DATADIR%%/snmpconf-data/snmpd-data/monitor
%%DATADIR%%/snmpconf-data/snmpd-data/operation
%%DATADIR%%/snmpconf-data/snmpd-data/snmpconf-config
%%DATADIR%%/snmpconf-data/snmpd-data/system
%%DATADIR%%/snmpconf-data/snmpd-data/trapsinks
%%DATADIR%%/snmpconf-data/snmptrapd-data/formatting
%%DATADIR%%/snmpconf-data/snmptrapd-data/snmpconf-config
%%DATADIR%%/snmpconf-data/snmptrapd-data/traphandle
@dirrm %%DATADIR%%/snmpconf-data/snmptrapd-data
@dirrm %%DATADIR%%/snmpconf-data/snmpd-data
@dirrm %%DATADIR%%/snmpconf-data/snmp-data
@dirrm %%DATADIR%%/snmpconf-data
@unexec rmdir %D/%%DATADIR%%/mibs 2>/dev/null || true
@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle 2>/dev/null || true
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto 2>/dev/null || true
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/Bundle 2>/dev/null || true
@dirrm include/net-snmp/system
@dirrm include/net-snmp/machine
@dirrm include/net-snmp/library
@dirrm include/net-snmp/agent
@dirrm include/net-snmp
@unexec rmdir %D/etc/snmp 2>/dev/null || true

View File

@ -5,16 +5,29 @@
# $FreeBSD$
#
PORTNAME= net-snmp
PORTNAME= snmp
PORTVERSION= 5.1
PORTREVISION= 2
PORTREVISION= 3
PKGNAMEPREFIX= net-
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
DISTNAME= ${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION}
.if defined(WITH_INETADDRESS_HACK)
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-snmplib::mib.c
.endif
.if !defined(WITH_TKMIB)
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-local:Makefile.in
.endif
MAINTAINER= kuriyama@FreeBSD.org
COMMENT= An extendable SNMP implementation
.if defined(WITH_TKMIB)
RUN_DEPEND= ${SITE_PERL}/${PERL_ARCH}/Tk.pm:${PORTSDIR}/x11-toolkits/p5-Tk
.endif
USE_REINPLACE= yes
USE_AUTOCONF_VER=257
USE_LIBTOOL= yes
@ -26,27 +39,79 @@ NO_LATEST_LINK= yes
USE_PERL5= yes
.endif
CONFIGURE_ARGS+=--enable-shared --with-mib-modules="${NET_SNMP_MIB_MODULES}" \
CONFIGURE_ENV+= PERLPROG="${PERL}" PSPROG="${PS_CMD}" SED="${SED}"
CONFIGURE_ARGS+=--enable-shared --enable-internal-md5 \
--with-mib-modules="${_NET_SNMP_MIB_MODULES}" \
--with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
--with-sys-contact="${NET_SNMP_SYS_CONTACT}" \
--with-sys-location="${NET_SNMP_SYS_LOCATION}" \
--with-logfile="${NET_SNMP_LOGFILE}" \
--with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat" \
--with-defaults
.if defined(WITHOUT_PERL)
PLIST_SUB+= WITHPERL="@comment "
.else
CONFIGURE_ARGS+= --with-perl-modules
PLIST_SUB+= WITHPERL=""
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat"
.if defined(BATCH)
CONFIGURE_ARGS+=--with-defaults
.endif
.if !defined(WITHOUT_DUMMY_VALUES)
CONFIGURE_ARGS+=--with-dummy-values
.endif
.include <bsd.port.pre.mk>
.if defined(WITHOUT_PERL)
PLIST_SUB+= WITH_PERL="@comment "
.else
CONFIGURE_ARGS+=--enable-embedded-perl --with-perl-modules
PLIST_SUB+= WITH_PERL=""
.endif
.if defined(WITH_TKMIB)
PLIST_SUB+= WITH_TKMIB=""
.else
PLIST_SUB+= WITH_TKMIB="@comment "
.endif
.if ${OSVERSION} >= 400014 && !defined(WITHOUT_IPV6)
CONFIGURE_ARGS+=--enable-ipv6
# --with-transport="UDPIPv6 TCPIPv6" --with-modules=mibII/ipv6"
PLIST_SUB+= WITH_IPV6=""
.else
PLIST_SUB+= WITH_IPV6="@comment "
.endif
SHLIB_VERSION= 6
PLIST_SUB+= SHLIB_VERSION=${SHLIB_VERSION}
LIBTOOL_SUB= LTCONFIG=${LIBTOOL_SHAREDIR}/ltconfig${LIBTOOL_VERSION} \
LTMAIN=${LIBTOOL_SHAREDIR}/ltmain.sh
SCRIPTS_SUB= PREFIX=${PREFIX} PERL=${PERL}
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
DEFAULT_SNMP_VERSION?= 3
NET_SNMP_SYS_CONTACT?= nobody@no.where
NET_SNMP_SYS_LOCATION?=
NET_SNMP_SYS_CONTACT?= nobody@nowhere.invalid
NET_SNMP_SYS_LOCATION?= somewhere
NET_SNMP_LOGFILE?= /var/log/snmpd.log
NET_SNMP_PERSISTENTDIR?=/var/net-snmp
NET_SNMP_MIB_MODULES?= host smux ucd-snmp/diskio
NET_SNMP_MIB_MODULES?= ${NET_SNMP_MIB_MODULE_LIST}
NET_SNMP_MIB_MODULE_LIST=host disman/event-mib smux mibII/mta_sendmail ucd-snmp/diskio
_NET_SNMP_MIB_MODULES=
.for module1 in ${NET_SNMP_MIB_MODULE_LIST}
_module1=${module1}
_define= false
. for module2 in ${NET_SNMP_MIB_MODULES}
_module2=${module2}
. if ${_module1} == ${_module2}
_define= true
. endif
. endfor
. if ${_define} == true
_NET_SNMP_MIB_MODULES+= ${module1}
PLIST_SUB+= WITH_${module1:C|.*/||:U}=""
. else
PLIST_SUB+= WITH_${module1:C|.*/||:U}="@comment "
. endif
.endfor
MAN1= mib2c.1 \
snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 \
@ -86,61 +151,112 @@ MAN3= add_mibdir.3 add_module_replacement.3 default_store.3 \
netsnmp_stash_cache.3 netsnmp_utilities.3
.if !defined(WITHOUT_PERL)
MAN3PERL= NetSNMP::default_store.3 NetSNMP::ASN.3 NetSNMP::OID.3 \
MAN3PERL= NetSNMP::ASN.3 NetSNMP::OID.3 NetSNMP::agent.3 \
NetSNMP::agent::default_store.3 \
NetSNMP::netsnmp_request_infoPtr.3 \
NetSNMP::agent.3 SNMP.3
NetSNMP::default_store.3 \
NetSNMP::netsnmp_request_infoPtr.3 SNMP.3
MAN3PERLPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
_MANPAGES+= ${MAN3PERL:S%^%${MAN3PERLPREFIX}/man/man3/%}
.endif
MAN5= snmp.conf.5 snmp_config.5 snmpd.conf.5 \
snmptrapd.conf.5 variables.5
MAN8= snmpd.8 snmptrapd.8
BIN= snmpbulkwalk snmpget snmpgetnext snmpnetstat snmpset \
BIN_FILES= snmpbulkwalk snmpget snmpgetnext snmpnetstat snmpset \
snmpstatus snmptest snmptranslate snmptrap snmpwalk
SBIN= snmpd snmptrapd
STARTUP_FILE= ${PREFIX}/etc/rc.d/snmpd.sh
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 400014
CONFIGURE_ARGS+=--enable-ipv6 \
--with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix"
SBIN_FILES= snmpd snmptrapd
STARTUP_DIR= ${PREFIX}/etc/rc.d
STARTUP_FILES= snmpd.sh snmptrapd.sh
SCRIPT_FILES= snmpcheck.def mib2c fixproc ipf-mod.pl snmpconf \
traptoemail
.if defined(WITH_TKMIB)
SCRIPT_FILES+= tkmib
.endif
DOC_FILES= AGENT.txt COPYING FAQ NEWS README \
README.agentx README.krb5 README.snmpv3 README.thread \
agent/mibgroup/README.smux
SHLIB_VERSION= 6
PLIST_SUB+= shlib=${SHLIB_VERSION}
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
PS_CMD?= /bin/ps
.if defined(WITH_INETADDRESS_HACK)
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-snmplib::mib.c
.endif
pre-everything::
@${ECHO_MSG}
@${ECHO_MSG} "You may use the following build options:"
@${ECHO_MSG}
@${ECHO_MSG} "WITH_INETADDRESS_HACK=yes builds with the inetaddress hack"
@${ECHO_MSG} "WITH_TKMIB=yes Install a graphical Perl/Tk/SNMP based mib browser"
@${ECHO_MSG} "WITHOUT_DUMMY_VALUES=yes Provide 'placeholder' dummy values where"
@${ECHO_MSG} " the necessary information is not available."
@${ECHO_MSG} "WITHOUT_PERL=yes Install the perl modules along with the rest"
@${ECHO_MSG} " of the net-snmp toolkit."
@${ECHO_MSG} "WITHOUT_IPV6=yes Generate IPv6 ready version."
@${ECHO_MSG}
@${ECHO_MSG} "DEFAULT_SNMP_VERSION=\"3\" Default version of SNMP to use."
@${ECHO_MSG} "NET_SNMP_SYS_CONTACT=\"${NET_SNMP_SYS_CONTACT}\""
@${ECHO_MSG} " Default system contact."
@${ECHO_MSG} "NET_SNMP_SYS_LOCATION=\"${NET_SNMP_SYS_LOCATION}\""
@${ECHO_MSG} " Default system location."
@${ECHO_MSG} "NET_SNMP_LOGFILE=\"${NET_SNMP_LOGFILE}\""
@${ECHO_MSG} " Default log file location for snmpd."
@${ECHO_MSG} "NET_SNMP_PERSISTENTDIR=\"${NET_SNMP_PERSISTENTDIR}\""
@${ECHO_MSG} " Default directory for persistent data storage."
@${ECHO_MSG} "NET_SNMP_MIB_MODULES=\"${NET_SNMP_MIB_MODULE_LIST}\""
@${ECHO_MSG} " Optional mib modules that can be built into the"
@${ECHO_MSG} " agent"
@${ECHO_MSG}
post-patch:
@${REINPLACE_CMD} \
-e 's|%%LTCONFIG%%|${LIBTOOL_SHAREDIR}/ltconfig${LIBTOOL_VERSION}|g' \
-e 's|%%LTMAIN%%|${LIBTOOL_SHAREDIR}/ltmain.sh|g' \
post-patch: patch-autoconf patch-script-files patch-startup-files
patch-autoconf:
@${REINPLACE_CMD} ${LIBTOOL_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/aclocal.m4
patch-script-files:
.for file in ${SCRIPT_FILES}
@${REINPLACE_CMD} ${SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/local/${file}
.endfor
patch-startup-files:
.for file in ${STARTUP_FILES}
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/${file}.sample > ${WRKDIR}/${file}
.endfor
post-configure:
@${FIND} ${WRKSRC} -name Makefile | \
${XARGS} ${PERL} -pi -e 's|$$| -m 755| if /^INSTALL\s+=/'
.if !defined(WITHOUT_PERL)
post-build:
@${FIND} ${CONFIGURE_WRKSRC}/perl -name Makefile | \
${XARGS} ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//'
${FIND} ${WRKSRC}/perl -name Makefile | \
${XARGS} ${PERL} -pi -e '\
s!^(PREFIX) = /usr/local!$$1 = ${PREFIX}!; \
s!^(INSTALLMAN3DIR) = /usr/local!$$1 = \$$\(PREFIX\)!; \
s! doc_(perl|site|\$$\(INSTALLDIRS\))_install$$!!; \
'
.endif
pre-install:
-@[ -f ${STARTUP_FILE} ] && \
(${ECHO} "Remove old ${STARTUP_FILE} before install." && exit 1)
post-install: strip-files install-startup-files install-doc-files display-message
post-install:
@( cd ${PREFIX}/bin && ${STRIP_CMD} ${BIN} )
@( cd ${PREFIX}/sbin && ${STRIP_CMD} ${SBIN} )
@${FIND} ${PREFIX}/include/net-snmp ${PREFIX}/share/snmp/mibs -type f \
| ${XARGS} ${CHMOD} 644
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/snmpd.sh.sample > ${STARTUP_FILE}
@${CHMOD} 755 ${STARTUP_FILE}
strip-files:
@cd ${PREFIX}/bin; ${STRIP_CMD} ${BIN_FILES}
@cd ${PREFIX}/sbin; ${STRIP_CMD} ${SBIN_FILES}
install-startup-files:
.for file in ${STARTUP_FILES}
@${INSTALL_SCRIPT} ${WRKDIR}/${file} ${STARTUP_DIR}
.endfor
install-doc-files:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
. for file in ${DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
. endfor
.endif
display-message:
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}

View File

@ -0,0 +1,11 @@
--- local/Makefile.in.orig Sat Apr 20 16:30:13 2002
+++ local/Makefile.in Wed Apr 24 01:45:55 2002
@@ -12,7 +12,7 @@
# local info
#
SNMPCONFPATH=@SNMPCONFPATH@
-PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail
+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail
SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
ipf-mod.pl.made snmpconf.made traptoemail.made
PERLPROG=@PERLPROG@

View File

@ -1,19 +1,47 @@
--- configure.in.orig Fri Nov 14 13:32:10 2003
+++ configure.in Fri Nov 14 13:36:27 2003
@@ -1357,7 +1357,7 @@
# fall back
--- configure.in.orig Thu Mar 6 07:41:13 2003
+++ configure.in Tue May 27 14:53:22 2003
@@ -1246,7 +1246,7 @@
dnl fall back
CFLAG="-f"
fi
-for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel
+for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel
+for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel /dev/null
do
if test -f $i -o $CFLAG $i; then
ac_cv_KERNEL_LOC="$i"
@@ -1376,6 +1376,7 @@
# Check for mount table location
#
@@ -1659,7 +1659,7 @@
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(stdarg.h string.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h netinet/ip.h netinet/ip_icmp.h net/if.h netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h sys/vm.h vm/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h linux/tasks.h pwd.h grp.h utmpx.h)
# FreeBSD required headers
-AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h machine/types.h sys/socketvar.h)
+AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h sys/socketvar.h)
# Linux
AC_CHECK_HEADERS(sys/conf.h netinet/in_systm.h netinet/tcp.h netinet/udp.h netinet/in_var.h netinet/if_ether.h netinet/ip_var.h netinet/tcp_timer.h netinet/tcp_var.h netinet/tcp_fsm.h netinet/udp_var.h netinet/icmp_var.h sys/protosw.h nlist.h ioctls.h asm/page.h netipx/ipx.h)
# NetBSD required headers
@@ -1866,6 +1866,26 @@
dnl checking for 4.3 vs 4.4 rtentry.
AC_CACHE_CHECK(type of rtentry structure,ac_cv_RTENTRY_TYPE,
[
+
+dnl 4.4 compatible but renamed on FreeBSD
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#define KERNEL
+#define _KERNEL
+#include <sys/socket.h>
+#undef KERNEL
+#undef _KERNEL
+#include <net/route.h>
+],[
+
+#ifndef STRUCT_RTENTRY_HAS_RT_DST
+#define rt_dst rt_nodes->rn_key
+#endif
+
+ struct rtentry rt;
+ rt.rt_nodes[0].rn_bit = 1;
+ rt.rt_dst;
+ ], ac_cv_RTENTRY_TYPE="BSD-4.4")
+# kuriyama: should /var/db/mounttab be used?
AC_CACHE_CHECK(for mount table location,ac_cv_ETC_MNTTAB,
[ac_cv_ETC_MNTTAB="unknown"
for i in /etc/mnttab /etc/mtab /etc/filesystems
dnl 4.4 compat
AC_TRY_COMPILE([

View File

@ -24,7 +24,7 @@
#elif defined(MBSTAT_SYMBOL)
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
long_return = mbstat.m_mbufs;
+#elif __FreeBSD_version < 500024
+#elif defined(freebsd5) && __FreeBSD_version < 500024
+ /* mbuf stats disabled */
+ return NULL;
+#else
@ -40,7 +40,7 @@
#elif defined(MBSTAT_SYMBOL)
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */
+#elif __FreeBSD_version < 500024
+#elif defined(freebsd5) && __FreeBSD_version < 500024
+ /* mbuf stats disabled */
+ return NULL;
+#else

View File

@ -1,23 +1,21 @@
--- agent/mibgroup/host/hr_system.c.orig Fri Nov 14 14:45:55 2003
+++ agent/mibgroup/host/hr_system.c Fri Nov 14 14:46:01 2003
@@ -276,11 +276,10 @@
struct utmp *utmp_p;
#endif
+#ifndef UTMP_HAS_NO_TYPE
setutent();
--- agent/mibgroup/host/hr_system.c.orig Sat Mar 1 05:35:13 2003
+++ agent/mibgroup/host/hr_system.c Sun Feb 8 17:39:50 2004
@@ -280,7 +280,6 @@
while ((utmp_p = getutent()) != NULL) {
-#ifndef UTMP_HAS_NO_TYPE
#ifndef UTMP_HAS_NO_TYPE
if (utmp_p->ut_type == USER_PROCESS) {
-#endif
/* This block of code fixes zombie user PIDs in the
utmp/utmpx file that would otherwise be counted as a
current user */
@@ -293,6 +292,7 @@
@@ -291,6 +290,10 @@
}
++total;
}
+#else
+ if (*utmp_p->ut_name != '~')
+ ++total;
+#endif
}
endutent();
+#endif
return total;
}

View File

@ -1,11 +0,0 @@
--- local/Makefile.in.orig Sat Apr 20 16:30:13 2002
+++ local/Makefile.in Wed Apr 24 01:45:55 2002
@@ -12,7 +12,7 @@
# local info
#
SNMPCONFPATH=@SNMPCONFPATH@
-PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail
+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail
SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
ipf-mod.pl.made snmpconf.made traptoemail.made
PERLPROG=@PERLPROG@

View File

@ -0,0 +1,138 @@
--- local/fixproc.orig Sat Apr 20 09:30:13 2002
+++ local/fixproc Sat Mar 6 01:59:59 2004
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!%%PERL%%
#
# fixproc [-min n] [-max n] [-check | -kill | -restart | -exist | -fix] proc ...
#
@@ -129,7 +129,7 @@
#
# Timothy Kong 3/1995
-$database_file = '/local/etc/fixproc.conf';
+$database_file = '%%PREFIX%%/etc/fixproc.conf';
$debug = 0; # specify debug level using -dN
# currently defined: -d1
@@ -155,6 +155,14 @@
$shell_header = "#!/bin/sh\n";
$shell_end_marker = 'shell_end_marker';
+open(command, "/bin/ps -p $$ |") || die "$0: can't run ps command\n";
+if (split(' ', <command>) > 4) {
+ $ps_opts = 'ax';
+} else {
+ $ps_opts = '-e';
+}
+close command;
+
&read_args();
&read_database();
# &dump_database(); # debug only
@@ -203,7 +211,9 @@
$i++;
}
close (file);
- system "chmod +x $file";
+ ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
+ $atime,$mtime,$ctime,$blksize,$blocks) = stat($file);
+ chmod $mode | 0111, $file;
return file;
}
@@ -237,8 +247,8 @@
# return code is number divided by 256
$error_code = (system "$tmpfile") / 256;
- system "rm $tmpfile";
- return ($fix_failed_error) if ($error_code != 0);
+ unlink $tmpfile;
+ return ($cannot_fix_error) if ($error_code != 0);
# sleep needed here?
return &do_exist ($proc);
}
@@ -268,7 +278,7 @@
# return code is number divided by 256
$error_code = (system "$tmpfile") / 256;
- system "rm $tmpfile";
+ unlink $tmpfile;
return ($check_failed_error) if ($error_code != 0);
# check passed, continue
@@ -285,10 +295,12 @@
# do ps, check to see if min <= no. of processes <= max
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc | /bin/wc -l |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-wc command\n";
- $proc_count = <command>;
- if (($proc_count < $min{$proc}) || ($proc_count > $max{$proc}))
+ @allprocs = <command>;
+ close command;
+ @procs = grep(/$proc/, @allprocs);
+ if (($#procs < $min{$proc}) || ($#procs > $max{$proc}))
{
return $check_failed_error;
}
@@ -305,41 +317,48 @@
# first try kill
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-awk command\n";
while (<command>)
{
- # match the first field of ps -e
+ if /$proc/ {
+ # match the first field of ps $ps_opts
$! = $fixproc_error;
- /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
- system "kill $1";
+ /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n";
+ kill 15, $1;
+ }
}
+ close command;
# if process still exist, try kill -9
sleep 2;
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-awk command\n";
$second_kill_needed = 0;
while (<command>)
{
- # match the first field of ps -e
+ if /$proc/ {
+ # match the first field of ps $ps_opts
$! = $fixproc_error;
- /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
- system "kill -9 $1";
+ /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n";
+ kill 9, $1;
$second_kill_needed = 1;
+ }
}
+ close command;
return ($no_error) if ($second_kill_needed == 0);
# see if kill -9 worked
sleep 2;
$! = $fixproc_error;
- open (command, "/bin/ps -e | /bin/grep $proc |")
+ open (command, "/bin/ps $ps_opts |")
|| die "$0: can't run ps-grep-awk command\n";
while (<command>)
{ # a process still exist, return error
- return $cannot_kill_error;
+ return $cannot_kill_error if /$proc/;
}
+ close command;
return $no_error; # good, all dead
}

View File

@ -0,0 +1,21 @@
--- local/ipf-mod.pl.orig Thu May 29 05:30:19 2003
+++ local/ipf-mod.pl Thu May 29 05:40:13 2003
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -s
+#!%%PERL%% -s
##
## IP Filter UCD-SNMP pass module
##
@@ -9,10 +9,10 @@
## Date: $ Tue Dec 1 10:24:08 EET 1998 $
## Version: 1.1a
-# Put this file in /usr/local/bin/ipf-mod.pl and then add the following
+# Put this file in %%PREFIX%%/bin/ipf-mod.pl and then add the following
# line to your snmpd.conf file (without the # at the front):
#
-# pass .1.3.6.1.4.1.2021.13.2 /usr/local/bin/ipf-mod.pl
+# pass .1.3.6.1.4.1.2021.13.2 %%PREFIX%%/bin/ipf-mod.pl
# enterprises.ucdavis.ucdExperimental.ipFilter = .1.3.6.1.4.1.2021.13.2
# ipfInTable.ipfInEntry.ipfInIndex integer = 1.1.1

View File

@ -0,0 +1,20 @@
--- local/mib2c.orig Fri Nov 14 02:28:39 2003
+++ local/mib2c Wed Feb 4 09:05:44 2004
@@ -1,5 +1,4 @@
-#!/usr/bin/perl
-#!/usr/bin/perl -w
+#!%%PERL%%
#
# $Id: mib2c,v 5.36 2003/11/14 01:28:39 rstory Exp $
@@ -56,8 +55,8 @@
if($ENV{MIB2C_DIR}) {
push @def_search_dirs, $ENV{MIB2C_DIR};
}
-push @def_search_dirs, "/usr/local/share/snmp/";
-
+push @def_search_dirs, "%%PREFIX%%/share/snmp/";
+push @def_search_dirs, "%%PREFIX%%/etc/snmp/";
sub usage {
print "$0 [-h] [-c configfile] [-f prefix] mibNode\n\n";

View File

@ -0,0 +1,8 @@
--- local/snmpcheck.def.orig Thu May 29 05:28:22 2003
+++ local/snmpcheck.def Thu May 29 05:29:49 2003
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl -w
+#!%%PERL%% -w
use strict 'refs';
require Net::Ping;

View File

@ -0,0 +1,53 @@
--- local/snmpconf.orig Thu May 29 05:30:19 2003
+++ local/snmpconf Thu May 29 05:34:45 2003
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!%%PERL%% -w
#
# A simple configuration file builder based on questions listed in
@@ -16,7 +16,7 @@
%arrayitems=qw(question 1 validanswer 1);
#defaults
-$opts{'c'} = "/usr/local/share/snmp/snmpconf-data";
+$opts{'c'} = "%%PREFIX%%/share/snmp/snmpconf-data";
# read the argument string
getopts("qadhfc:piI:r:R:g:G", \%opts);
@@ -26,7 +26,7 @@
print "$0 [options] [FILETOCREATE...]\n";
print "options:\n";
print " -f overwrite existing files without prompting\n";
- print " -i install created files into /usr/local/share/snmp.\n";
+ print " -i install created files into %%PREFIX%%/share/snmp.\n";
print " -p install created files into $ENV{HOME}/.snmp.\n";
print " -I DIR install created files into DIR.\n";
print " -a Don't ask any questions, just read in current\n";
@@ -62,7 +62,7 @@
#
# Find existing files to possibly read in.
#
-my @searchpath = (qw(/usr/local/share/snmp /usr/local/etc/snmp .), "$ENV{HOME}/.snmp");
+my @searchpath = (qw(%%PREFIX%%/share/snmp %%PREFIX%%/etc/snmp .), "$ENV{HOME}/.snmp");
push @searchpath, $opts{I} if ($opts{I});
foreach my $i (@searchpath) {
debug("searching $i\n");
@@ -159,7 +159,7 @@
foreach my $i (@didfiles) {
if ($didfile{$i} ne "1") {
if ($opts{'i'} || $opts{'I'}) {
- $opts{'I'} = "/usr/local/share/snmp" if (!$opts{'I'});
+ $opts{'I'} = "%%PREFIX%%/share/snmp" if (!$opts{'I'});
system("mv $opts{'I'}/$i $opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i");
system("mv $didfile{$i} $opts{'I'}");
Print(" $didfile{$i} installed in $opts{'I'}\n");
@@ -180,7 +180,7 @@
}
if (!$opts{'p'} && !$opts{'i'} && !$opts{'I'}) {
- Print("\nThese files should be moved to /usr/local/share/snmp/ if you
+ Print("\nThese files should be moved to %%PREFIX%%/share/snmp/ if you
want them used by everyone on the system. In the future, if you add
the -i option to the command line I'll copy them there automatically for you.

View File

@ -0,0 +1,9 @@
--- local/tkmib.orig Thu May 29 05:30:19 2003
+++ local/tkmib Thu May 29 05:31:46 2003
@@ -1,5 +1,4 @@
-#!/usr/bin/perl
-#!/usr/bin/perl -w
+#!%%PERL%% -w
require 5;

View File

@ -0,0 +1,16 @@
--- local/traptoemail.orig Thu May 29 05:30:19 2003
+++ local/traptoemail Thu May 29 05:35:13 2003
@@ -1,11 +1,11 @@
-#!/usr/bin/perl
+#!%%PERL%%
# This is a snmptrapd handler script to convert snmp traps into email
# messages.
# Usage:
# Put a line like the following in your snmptrapd.conf file:
-# traphandle TRAPOID|default /usr/local/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
+# traphandle TRAPOID|default %%PREFIX%%/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
# FROM defaults to "root"
# SMTPSERVER defaults to "localhost"

View File

@ -1,12 +1,14 @@
--- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig Sat Nov 9 23:59:53 2002
+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c Sat Aug 16 17:09:01 2003
@@ -207,11 +207,13 @@
--- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig Sat Nov 9 15:59:53 2002
+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c Sat Feb 21 11:55:05 2004
@@ -204,6 +204,7 @@
if (kd == NULL)
kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, NULL);
+#if !defined(freebsd5)
auto_nlist(NSWDEV_SYMBOL, (char *) &nswdev, sizeof(nswdev));
auto_nlist(DMMAX_SYMBOL, (char *) &dmmax, sizeof(dmmax));
+#if !defined(freebsd5)
sw = (struct swdevt *) malloc(nswdev * sizeof(*sw));
if (sw == NULL)
@@ -212,6 +213,7 @@
return;
auto_nlist(SWDEVT_SYMBOL, (char *) sw, nswdev * sizeof(*sw));

View File

@ -28,8 +28,9 @@ fi
name=snmpd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/snmpd
pidfile='/var/run/snmpd.pid'
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
sig_stop=-KILL
load_rc_config $name
load_rc_config ${name}
run_rc_command "$1"

View File

@ -0,0 +1,35 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: snmptrapd
# REQUIRE: DAEMON
# KEYWORD: FreeBSD
#
# Add the following line to /etc/rc.conf to enable snmptrapd:
#
# snmptrapd_enable="YES"
#
snmptrapd_enable="NO"
snmptrapd_flags="-p /var/run/snmptrapd.pid"
. %%RC_SUBR%%
load_rc_config net_snmptrapd
if [ ! -z "$net_snmptrapd_enable" ]; then
echo "Warning: \$net_snmptrapd_enable is obsoleted."
echo " Use \$snmptrapd_enable instead."
snmptrapd_enable="$net_snmptrapd_enable"
[ ! -z "$net_snmptrapd_flags" ] && snmptrapd_flags="$net_snmptrapd_flags"
fi
name=snmptrapd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
load_rc_config ${name}
run_rc_command "$1"

View File

@ -7,6 +7,6 @@ Various tools relating to the Simple Network Management Protocol including:
tools to request or set information from SNMP agents
tools to generate and handle SNMP traps
a version of the unix 'netstat' command using SNMP
a Tk/perl mib browser
a graphical Perl/Tk/SNMP based mib browser
WWW: http://net-snmp.sourceforge.net/

View File

@ -1,23 +1,26 @@
**** This port installs snmp daemon, include files and libraries but not
invoking snmpd by default.
If you want to invoke snmpd from startup, put these lines into
/etc/rc.conf.
**** This port installs snmp daemon, header files and libraries but don't
invokes snmpd by default.
If you want to invoke snmpd and/or snmptrapd at startup, put these
lines into /etc/rc.conf.
snmpd_enable="YES"
snmpd_flags=""
snmpd_flags="-as -p /var/run/snmpd.pid"
snmptrapd_enable="YES"
snmptrapd_flags="-as -p /var/run/snmptrapd.pid"
**** You can specify make variables as:
**** You may specify the following make variables:
NET_SNMP_SYS_CONTACT="kuriyama@FreeBSD.org"
NET_SNMP_SYS_LOCATION="Tokyo, Japan"
DEFAULT_SNMP_VERSION=3
NET_SNMP_MIB_MODULES="host smux mibII/mta_sendmail ucd-snmp/diskio"
NET_SNMP_LOGFILE=/var/log/snmpd.log
NET_SNMP_PERSISTENTDIR=/var/net-snmp
to define default values (or overwriting defaults). At least
setting first two variables, you will not be prompted during
configuration process. Or you can set
configuration process. You may also set
BATCH="yes"
to make to avoid interactive configuration.
to avoid interactive configuration.

View File

@ -22,8 +22,11 @@ bin/snmptrap
bin/snmpusm
bin/snmpvacm
bin/snmpwalk
%%WITH_TKMIB%%bin/tkmib
bin/traptoemail
etc/rc.d/snmpd.sh
etc/rc.d/snmptrapd.sh
@exec mkdir %D/etc/snmp 2>/dev/null || true
include/net-snmp/agent/agent_callbacks.h
include/net-snmp/agent/agent_handler.h
include/net-snmp/agent/agent_index.h
@ -91,9 +94,9 @@ include/net-snmp/library/snmp-tc.h
include/net-snmp/library/snmp.h
include/net-snmp/library/snmpCallbackDomain.h
include/net-snmp/library/snmpTCPDomain.h
include/net-snmp/library/snmpTCPIPv6Domain.h
%%WITH_IPV6%%include/net-snmp/library/snmpTCPIPv6Domain.h
include/net-snmp/library/snmpUDPDomain.h
include/net-snmp/library/snmpUDPIPv6Domain.h
%%WITH_IPV6%%include/net-snmp/library/snmpUDPIPv6Domain.h
include/net-snmp/library/snmpUnixDomain.h
include/net-snmp/library/snmp_alarm.h
include/net-snmp/library/snmp_api.h
@ -158,152 +161,172 @@ include/net-snmp/types.h
include/net-snmp/utilities.h
include/net-snmp/varbind_api.h
include/net-snmp/version.h
@dirrm include/net-snmp/agent
@dirrm include/net-snmp/library
@dirrm include/net-snmp/machine
@dirrm include/net-snmp/system
@dirrm include/net-snmp
lib/libnetsnmp.a
lib/libnetsnmp.so
lib/libnetsnmp.so.%%shlib%%
lib/libnetsnmp.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmp.so.%%SHLIB_VERSION%% %B/libnetsnmp.so
@unexec rm -f %B/libnetsnmp.so 2> /dev/null || true
lib/libnetsnmpagent.a
lib/libnetsnmpagent.so
lib/libnetsnmpagent.so.%%shlib%%
lib/libnetsnmpagent.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmpagent.so.%%SHLIB_VERSION%% %B/libnetsnmpagent.so
@unexec rm -f %B/libnetsnmpagent.so 2> /dev/null || true
lib/libnetsnmphelpers.a
lib/libnetsnmphelpers.so
lib/libnetsnmphelpers.so.%%shlib%%
lib/libnetsnmphelpers.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmphelpers.so.%%SHLIB_VERSION%% %B/libnetsnmphelpers.so
@unexec rm -f %B/libnetsnmphelpers.so 2> /dev/null || true
lib/libnetsnmpmibs.a
lib/libnetsnmpmibs.so
lib/libnetsnmpmibs.so.%%shlib%%
lib/libnetsnmpmibs.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmpmibs.so.%%SHLIB_VERSION%% %B/libnetsnmpmibs.so
@unexec rm -f %B/libnetsnmpmibs.so 2> /dev/null || true
lib/libnetsnmptrapd.a
lib/libnetsnmptrapd.so
lib/libnetsnmptrapd.so.%%shlib%%
lib/libnetsnmptrapd.so.%%SHLIB_VERSION%%
@exec ln -fs libnetsnmptrapd.so.%%SHLIB_VERSION%% %B/libnetsnmptrapd.so
@unexec rm -f %B/libnetsnmptrapd.so 2> /dev/null || true
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Bundle/Makefile.subs.pl
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/ASN.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/OID.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/default_store.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/netsnmp_request_infoPtr.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/default_store.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/SNMP.pm
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP/.packlist
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/autosplit.ix
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/autosplit.ix
sbin/snmpd
sbin/snmptrapd
share/snmp/mib2c.access_functions.conf
share/snmp/mib2c.array-user.conf
share/snmp/mib2c.check_values.conf
share/snmp/mib2c.check_values_local.conf
share/snmp/mib2c.column_defines.conf
share/snmp/mib2c.column_enums.conf
share/snmp/mib2c.conf
share/snmp/mib2c.create-dataset.conf
share/snmp/mib2c.int_watch.conf
share/snmp/mib2c.iterate.conf
share/snmp/mib2c.iterate_access.conf
share/snmp/mib2c.old-api.conf
share/snmp/mib2c.scalar.conf
share/snmp/mibs/AGENTX-MIB.txt
share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
share/snmp/mibs/EtherLike-MIB.txt
share/snmp/mibs/HCNUM-TC.txt
share/snmp/mibs/HOST-RESOURCES-MIB.txt
share/snmp/mibs/HOST-RESOURCES-TYPES.txt
share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
share/snmp/mibs/IANA-LANGUAGE-MIB.txt
share/snmp/mibs/IANAifType-MIB.txt
share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
share/snmp/mibs/IF-MIB.txt
share/snmp/mibs/INET-ADDRESS-MIB.txt
share/snmp/mibs/IP-FORWARD-MIB.txt
share/snmp/mibs/IP-MIB.txt
share/snmp/mibs/IPV6-ICMP-MIB.txt
share/snmp/mibs/IPV6-MIB.txt
share/snmp/mibs/IPV6-TC.txt
share/snmp/mibs/IPV6-TCP-MIB.txt
share/snmp/mibs/IPV6-UDP-MIB.txt
share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
share/snmp/mibs/NET-SNMP-MIB.txt
share/snmp/mibs/NET-SNMP-TC.txt
share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
share/snmp/mibs/RFC-1215.txt
share/snmp/mibs/RFC1155-SMI.txt
share/snmp/mibs/RFC1213-MIB.txt
share/snmp/mibs/RMON-MIB.txt
share/snmp/mibs/SMUX-MIB.txt
share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
share/snmp/mibs/SNMP-MPD-MIB.txt
share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
share/snmp/mibs/SNMP-PROXY-MIB.txt
share/snmp/mibs/SNMP-TARGET-MIB.txt
share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
share/snmp/mibs/SNMPv2-CONF.txt
share/snmp/mibs/SNMPv2-MIB.txt
share/snmp/mibs/SNMPv2-SMI.txt
share/snmp/mibs/SNMPv2-TC.txt
share/snmp/mibs/SNMPv2-TM.txt
share/snmp/mibs/TCP-MIB.txt
share/snmp/mibs/UCD-DEMO-MIB.txt
share/snmp/mibs/UCD-DISKIO-MIB.txt
share/snmp/mibs/UCD-DLMOD-MIB.txt
share/snmp/mibs/UCD-IPFWACC-MIB.txt
share/snmp/mibs/UCD-SNMP-MIB.txt
share/snmp/mibs/UDP-MIB.txt
@unexec rm -f %D/share/snmp/mibs/.index 2>/dev/null || true
share/snmp/snmpconf-data/snmp-data/authopts
share/snmp/snmpconf-data/snmp-data/debugging
share/snmp/snmpconf-data/snmp-data/mibs
share/snmp/snmpconf-data/snmp-data/output
share/snmp/snmpconf-data/snmp-data/snmpconf-config
share/snmp/snmpconf-data/snmpd-data/acl
share/snmp/snmpconf-data/snmpd-data/basic_setup
share/snmp/snmpconf-data/snmpd-data/extending
share/snmp/snmpconf-data/snmpd-data/monitor
share/snmp/snmpconf-data/snmpd-data/operation
share/snmp/snmpconf-data/snmpd-data/snmpconf-config
share/snmp/snmpconf-data/snmpd-data/system
share/snmp/snmpconf-data/snmpd-data/trapsinks
share/snmp/snmpconf-data/snmptrapd-data/formatting
share/snmp/snmpconf-data/snmptrapd-data/snmpconf-config
share/snmp/snmpconf-data/snmptrapd-data/traphandle
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.so
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.bs
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/autosplit.ix
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP/.packlist
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Bundle/Makefile.subs.pl
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/default_store.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/ASN.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/OID.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/netsnmp_request_infoPtr.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/default_store.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent.pm
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/SNMP.pm
@dirrm share/snmp/snmpconf-data/snmp-data
@dirrm share/snmp/snmpconf-data/snmpd-data
@dirrm share/snmp/snmpconf-data/snmptrapd-data
@dirrm share/snmp/snmpconf-data
@dirrm share/snmp/mibs
@unexec rmdir %D/share/snmp 2>/dev/null || true
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle 2>/dev/null || true
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto 2>/dev/null || true
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/Bundle 2>/dev/null || true
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP 2>/dev/null || true
%%PORTDOCS%%%%DOCSDIR%%/AGENT.txt
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/FAQ
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.agentx
%%PORTDOCS%%%%DOCSDIR%%/README.krb5
%%PORTDOCS%%%%DOCSDIR%%/README.snmpv3
%%PORTDOCS%%%%DOCSDIR%%/README.thread
%%PORTDOCS%%%%DOCSDIR%%/README.smux
%%DATADIR%%/mib2c.access_functions.conf
%%DATADIR%%/mib2c.array-user.conf
%%DATADIR%%/mib2c.check_values.conf
%%DATADIR%%/mib2c.check_values_local.conf
%%DATADIR%%/mib2c.column_defines.conf
%%DATADIR%%/mib2c.column_enums.conf
%%DATADIR%%/mib2c.conf
%%DATADIR%%/mib2c.create-dataset.conf
%%DATADIR%%/mib2c.int_watch.conf
%%DATADIR%%/mib2c.iterate.conf
%%DATADIR%%/mib2c.iterate_access.conf
%%DATADIR%%/mib2c.old-api.conf
%%DATADIR%%/mib2c.scalar.conf
%%DATADIR%%/mibs/AGENTX-MIB.txt
%%WITH_EVENT-MIB%%%%DATADIR%%/mibs/DISMAN-EVENT-MIB.txt
%%DATADIR%%/mibs/DISMAN-SCHEDULE-MIB.txt
%%DATADIR%%/mibs/DISMAN-SCRIPT-MIB.txt
%%DATADIR%%/mibs/EtherLike-MIB.txt
%%DATADIR%%/mibs/HCNUM-TC.txt
%%DATADIR%%/mibs/HOST-RESOURCES-MIB.txt
%%DATADIR%%/mibs/HOST-RESOURCES-TYPES.txt
%%DATADIR%%/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
%%DATADIR%%/mibs/IANA-LANGUAGE-MIB.txt
%%DATADIR%%/mibs/IANAifType-MIB.txt
%%DATADIR%%/mibs/IF-INVERTED-STACK-MIB.txt
%%DATADIR%%/mibs/IF-MIB.txt
%%DATADIR%%/mibs/INET-ADDRESS-MIB.txt
%%DATADIR%%/mibs/IP-FORWARD-MIB.txt
%%DATADIR%%/mibs/IP-MIB.txt
%%DATADIR%%/mibs/IPV6-ICMP-MIB.txt
%%DATADIR%%/mibs/IPV6-MIB.txt
%%DATADIR%%/mibs/IPV6-TC.txt
%%DATADIR%%/mibs/IPV6-TCP-MIB.txt
%%DATADIR%%/mibs/IPV6-UDP-MIB.txt
%%WITH_MTA_SENDMAIL%%%%DATADIR%%/mibs/MTA-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-AGENT-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-EXAMPLES-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-MIB.txt
%%DATADIR%%/mibs/NET-SNMP-TC.txt
%%WITH_MTA_SENDMAIL%%%%DATADIR%%/mibs/NETWORK-SERVICES-MIB.txt
%%DATADIR%%/mibs/NOTIFICATION-LOG-MIB.txt
%%DATADIR%%/mibs/RFC-1215.txt
%%DATADIR%%/mibs/RFC1155-SMI.txt
%%DATADIR%%/mibs/RFC1213-MIB.txt
%%DATADIR%%/mibs/RMON-MIB.txt
%%DATADIR%%/mibs/SMUX-MIB.txt
%%DATADIR%%/mibs/SNMP-COMMUNITY-MIB.txt
%%DATADIR%%/mibs/SNMP-FRAMEWORK-MIB.txt
%%DATADIR%%/mibs/SNMP-MPD-MIB.txt
%%DATADIR%%/mibs/SNMP-NOTIFICATION-MIB.txt
%%DATADIR%%/mibs/SNMP-PROXY-MIB.txt
%%DATADIR%%/mibs/SNMP-TARGET-MIB.txt
%%DATADIR%%/mibs/SNMP-USER-BASED-SM-MIB.txt
%%DATADIR%%/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
%%DATADIR%%/mibs/SNMPv2-CONF.txt
%%DATADIR%%/mibs/SNMPv2-MIB.txt
%%DATADIR%%/mibs/SNMPv2-SMI.txt
%%DATADIR%%/mibs/SNMPv2-TC.txt
%%DATADIR%%/mibs/SNMPv2-TM.txt
%%DATADIR%%/mibs/TCP-MIB.txt
%%DATADIR%%/mibs/UCD-DEMO-MIB.txt
%%DATADIR%%/mibs/UCD-DISKIO-MIB.txt
%%DATADIR%%/mibs/UCD-DLMOD-MIB.txt
%%DATADIR%%/mibs/UCD-IPFWACC-MIB.txt
%%DATADIR%%/mibs/UCD-SNMP-MIB.txt
%%DATADIR%%/mibs/UDP-MIB.txt
@unexec rm -f %D/%%DATADIR%%/mibs/.index 2>/dev/null || true
%%WITH_PERL%%%%DATADIR%%/snmp_perl.pl
%%DATADIR%%/snmpconf-data/snmp-data/authopts
%%DATADIR%%/snmpconf-data/snmp-data/debugging
%%DATADIR%%/snmpconf-data/snmp-data/mibs
%%DATADIR%%/snmpconf-data/snmp-data/output
%%DATADIR%%/snmpconf-data/snmp-data/snmpconf-config
%%DATADIR%%/snmpconf-data/snmpd-data/acl
%%DATADIR%%/snmpconf-data/snmpd-data/basic_setup
%%DATADIR%%/snmpconf-data/snmpd-data/extending
%%DATADIR%%/snmpconf-data/snmpd-data/monitor
%%DATADIR%%/snmpconf-data/snmpd-data/operation
%%DATADIR%%/snmpconf-data/snmpd-data/snmpconf-config
%%DATADIR%%/snmpconf-data/snmpd-data/system
%%DATADIR%%/snmpconf-data/snmpd-data/trapsinks
%%DATADIR%%/snmpconf-data/snmptrapd-data/formatting
%%DATADIR%%/snmpconf-data/snmptrapd-data/snmpconf-config
%%DATADIR%%/snmpconf-data/snmptrapd-data/traphandle
@dirrm %%DATADIR%%/snmpconf-data/snmptrapd-data
@dirrm %%DATADIR%%/snmpconf-data/snmpd-data
@dirrm %%DATADIR%%/snmpconf-data/snmp-data
@dirrm %%DATADIR%%/snmpconf-data
@unexec rmdir %D/%%DATADIR%%/mibs 2>/dev/null || true
@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle 2>/dev/null || true
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto 2>/dev/null || true
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/Bundle 2>/dev/null || true
@dirrm include/net-snmp/system
@dirrm include/net-snmp/machine
@dirrm include/net-snmp/library
@dirrm include/net-snmp/agent
@dirrm include/net-snmp
@unexec rmdir %D/etc/snmp 2>/dev/null || true