View | Details | Raw Unified | Return to bug 63759 | Differences between
and this patch

Collapse All | Expand All

(-)files/extra-patch-local:Makefile.in (+11 lines)
Added Link Here
1
--- local/Makefile.in.orig	Sat Apr 20 16:30:13 2002
2
+++ local/Makefile.in	Wed Apr 24 01:45:55 2002
3
@@ -12,7 +12,7 @@
4
 # local info
5
 #
6
 SNMPCONFPATH=@SNMPCONFPATH@
7
-PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail
8
+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail
9
 SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
10
 	ipf-mod.pl.made snmpconf.made traptoemail.made
11
 PERLPROG=@PERLPROG@
(-)files/patch-local::fixproc (+78 lines)
Added Link Here
1
--- local/fixproc.orig	Sat Apr 20 09:30:13 2002
2
+++ local/fixproc	Thu May 29 05:17:16 2003
3
@@ -1,4 +1,4 @@
4
-#!/usr/bin/perl
5
+#!%%PERL%%
6
 # 
7
 # fixproc [-min n] [-max n] [-check | -kill | -restart | -exist | -fix] proc ...
8
 # 
9
@@ -129,7 +129,7 @@
10
 #
11
 # Timothy Kong		3/1995
12
 
13
-$database_file = '/local/etc/fixproc.conf';
14
+$database_file = '%%PREFIX%%/etc/fixproc.conf';
15
 
16
 $debug = 0;			# specify debug level using -dN
17
 				# currently defined: -d1
18
@@ -238,7 +238,7 @@
19
       	# return code is number divided by 256
20
       $error_code = (system "$tmpfile") / 256;
21
       system "rm $tmpfile";
22
-      return ($fix_failed_error) if ($error_code != 0);
23
+      return ($cannot_fix_error) if ($error_code != 0);
24
         # sleep needed here?
25
       return &do_exist ($proc);
26
     }
27
@@ -285,7 +285,7 @@
28
 
29
   # do ps, check to see if min <= no. of processes <= max
30
   $! = $fixproc_error;
31
-  open (command, "/bin/ps -e | /bin/grep $proc | /bin/wc -l |")
32
+  open (command, "/bin/ps ax | grep $proc | grep -v grep | wc -l |")
33
     || die "$0: can't run ps-grep-wc command\n";
34
   $proc_count = <command>;
35
   if (($proc_count < $min{$proc}) || ($proc_count > $max{$proc}))
36
@@ -305,27 +305,27 @@
37
 
38
   # first try kill
39
   $! = $fixproc_error;
40
-  open (command, "/bin/ps -e | /bin/grep $proc |")
41
+  open (command, "/bin/ps ax | grep $proc | grep -v grep |")
42
     || die "$0: can't run ps-grep-awk command\n";
43
   while (<command>)
44
     {
45
-      # match the first field of ps -e
46
+      # match the first field of ps ax
47
       $! = $fixproc_error;
48
-      /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
49
+      /^\s*(\d+)\s/ || die "$0: can't match ps ax output\n";
50
       system "kill $1";
51
     }
52
 
53
   # if process still exist, try kill -9
54
   sleep 2;
55
   $! = $fixproc_error;
56
-  open (command, "/bin/ps -e | /bin/grep $proc |")
57
+  open (command, "/bin/ps ax | grep $proc |")
58
     || die "$0: can't run ps-grep-awk command\n";
59
   $second_kill_needed = 0;
60
   while (<command>)
61
     {
62
-      # match the first field of ps -e
63
+      # match the first field of ps ax
64
       $! = $fixproc_error;
65
-      /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
66
+      /^\s*(\d+)\s/ || die "$0: can't match ps ax output\n";
67
       system "kill -9 $1";
68
       $second_kill_needed = 1;
69
     }
70
@@ -334,7 +334,7 @@
71
   # see if kill -9 worked
72
   sleep 2;
73
   $! = $fixproc_error;
74
-  open (command, "/bin/ps -e | /bin/grep $proc |")
75
+  open (command, "/bin/ps ax | grep $proc |")
76
     || die "$0: can't run ps-grep-awk command\n";
77
   while (<command>)
78
     {				# a process still exist, return error
(-)files/patch-local::ipf-mod.pl (+21 lines)
Added Link Here
1
--- local/ipf-mod.pl.orig	Thu May 29 05:30:19 2003
2
+++ local/ipf-mod.pl	Thu May 29 05:40:13 2003
3
@@ -1,4 +1,4 @@
4
-#!/usr/bin/perl -s
5
+#!%%PERL%% -s
6
 ##
7
 ## IP Filter UCD-SNMP pass module
8
 ##
9
@@ -9,10 +9,10 @@
10
 ## Date: $ Tue Dec  1 10:24:08 EET 1998 $
11
 ## Version: 1.1a
12
 
13
-# Put this file in /usr/local/bin/ipf-mod.pl and then add the following 
14
+# Put this file in %%PREFIX%%/bin/ipf-mod.pl and then add the following 
15
 # line to your snmpd.conf file (without the # at the front):
16
 #
17
-#   pass .1.3.6.1.4.1.2021.13.2 /usr/local/bin/ipf-mod.pl
18
+#   pass .1.3.6.1.4.1.2021.13.2 %%PREFIX%%/bin/ipf-mod.pl
19
 
20
 # enterprises.ucdavis.ucdExperimental.ipFilter	= .1.3.6.1.4.1.2021.13.2
21
 # ipfInTable.ipfInEntry.ipfInIndex		integer	= 1.1.1
(-)files/patch-local::mib2c (+20 lines)
Added Link Here
1
--- local/mib2c.orig	Fri Nov 14 02:28:39 2003
2
+++ local/mib2c	Wed Feb  4 09:05:44 2004
3
@@ -1,5 +1,4 @@
4
-#!/usr/bin/perl
5
-#!/usr/bin/perl -w
6
+#!%%PERL%%
7
 
8
 #
9
 # $Id: mib2c,v 5.36 2003/11/14 01:28:39 rstory Exp $
10
@@ -56,8 +55,8 @@
11
 if($ENV{MIB2C_DIR}) {
12
   push @def_search_dirs, $ENV{MIB2C_DIR};
13
 }
14
-push @def_search_dirs, "/usr/local/share/snmp/";
15
-
16
+push @def_search_dirs, "%%PREFIX%%/share/snmp/";
17
+push @def_search_dirs, "%%PREFIX%%/etc/snmp/";
18
 
19
 sub usage {
20
     print "$0 [-h] [-c configfile] [-f prefix] mibNode\n\n";
(-)files/patch-local::snmpcheck.def (+8 lines)
Added Link Here
1
--- local/snmpcheck.def.orig	Thu May 29 05:28:22 2003
2
+++ local/snmpcheck.def	Thu May 29 05:29:49 2003
3
@@ -1,4 +1,4 @@
4
-#!/usr/local/bin/perl -w
5
+#!%%PERL%% -w
6
 
7
 use strict 'refs';
8
 require Net::Ping;
(-)files/patch-local::snmpconf (+53 lines)
Added Link Here
1
--- local/snmpconf.orig	Thu May 29 05:30:19 2003
2
+++ local/snmpconf	Thu May 29 05:34:45 2003
3
@@ -1,4 +1,4 @@
4
-#!/usr/bin/perl -w
5
+#!%%PERL%% -w
6
 
7
 #
8
 # A simple configuration file builder based on questions listed in
9
@@ -16,7 +16,7 @@
10
 %arrayitems=qw(question 1 validanswer 1);
11
 
12
 #defaults
13
-$opts{'c'} = "/usr/local/share/snmp/snmpconf-data";
14
+$opts{'c'} = "%%PREFIX%%/share/snmp/snmpconf-data";
15
 
16
 # read the argument string
17
 getopts("qadhfc:piI:r:R:g:G", \%opts);
18
@@ -26,7 +26,7 @@
19
     print "$0 [options] [FILETOCREATE...]\n";
20
     print "options:\n";
21
     print "  -f           overwrite existing files without prompting\n";
22
-    print "  -i           install created files into /usr/local/share/snmp.\n";
23
+    print "  -i           install created files into %%PREFIX%%/share/snmp.\n";
24
     print "  -p           install created files into $ENV{HOME}/.snmp.\n";
25
     print "  -I DIR       install created files into DIR.\n";
26
     print "  -a           Don't ask any questions, just read in current\n";
27
@@ -62,7 +62,7 @@
28
 #
29
 # Find existing files to possibly read in.
30
 #
31
-my @searchpath = (qw(/usr/local/share/snmp /usr/local/etc/snmp .), "$ENV{HOME}/.snmp");
32
+my @searchpath = (qw(%%PREFIX%%/share/snmp %%PREFIX%%/etc/snmp .), "$ENV{HOME}/.snmp");
33
 push @searchpath, $opts{I} if ($opts{I});
34
 foreach my $i (@searchpath) {
35
     debug("searching $i\n");
36
@@ -159,7 +159,7 @@
37
 foreach my $i (@didfiles) {
38
     if ($didfile{$i} ne "1") {
39
 	if ($opts{'i'} || $opts{'I'}) {
40
-	    $opts{'I'} = "/usr/local/share/snmp" if (!$opts{'I'});
41
+	    $opts{'I'} = "%%PREFIX%%/share/snmp" if (!$opts{'I'});
42
 	    system("mv $opts{'I'}/$i $opts{'I'}/$i.bak") if (-f "$opts{'I'}/$i");
43
 	    system("mv $didfile{$i} $opts{'I'}");
44
 	    Print("  $didfile{$i} installed in $opts{'I'}\n");
45
@@ -180,7 +180,7 @@
46
 }
47
 
48
 if (!$opts{'p'} && !$opts{'i'} && !$opts{'I'}) {
49
-    Print("\nThese files should be moved to /usr/local/share/snmp/ if you
50
+    Print("\nThese files should be moved to %%PREFIX%%/share/snmp/ if you
51
 want them used by everyone on the system.  In the future, if you add 
52
 the -i option to the command line I'll copy them there automatically for you.
53
 
(-)files/patch-local::tkmib (+9 lines)
Added Link Here
1
--- local/tkmib.orig	Thu May 29 05:30:19 2003
2
+++ local/tkmib	Thu May 29 05:31:46 2003
3
@@ -1,5 +1,4 @@
4
-#!/usr/bin/perl
5
-#!/usr/bin/perl -w
6
+#!%%PERL%%
7
 
8
 require 5;
9
 
(-)files/patch-local::traptoemail (-1 / +16 lines)
Added Link Here
0
---------==========---------- CVS DIFF ----------==========----------
1
--- local/traptoemail.orig	Thu May 29 05:30:19 2003
2
+++ local/traptoemail	Thu May 29 05:35:13 2003
3
@@ -1,11 +1,11 @@
4
-#!/usr/bin/perl
5
+#!%%PERL%%
6
 
7
 # This is a snmptrapd handler script to convert snmp traps into email
8
 # messages.
9
 
10
 # Usage:
11
 # Put a line like the following in your snmptrapd.conf file:
12
-#  traphandle TRAPOID|default /usr/local/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
13
+#  traphandle TRAPOID|default %%PREFIX%%/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
14
 #     FROM defaults to "root"
15
 #     SMTPSERVER defaults to "localhost"
16
 
(-)Makefile (-48 / +164 lines)
Lines 5-20 Link Here
5
# $FreeBSD$
5
# $FreeBSD$
6
#
6
#
7
7
8
PORTNAME=	net-snmp
8
PORTNAME=	snmp
9
PORTVERSION=	5.1
9
PORTVERSION=	5.1
10
PORTREVISION=	1
10
PORTREVISION=	2
11
PKGNAMEPREFIX=	net-
11
CATEGORIES=	net ipv6
12
CATEGORIES=	net ipv6
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	net-snmp
14
MASTER_SITE_SUBDIR=	net-snmp
15
DISTNAME=	${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION}
16
17
.if defined(WITH_INETADDRESS_HACK)
18
EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-snmplib::mib.c
19
.endif
20
.if !defined(WITH_TKMIB)
21
EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-local:Makefile.in
22
.endif
14
23
15
MAINTAINER=	kuriyama@FreeBSD.org
24
MAINTAINER=	kuriyama@FreeBSD.org
16
COMMENT=	An extendable SNMP implementation
25
COMMENT=	An extendable SNMP implementation
17
26
27
.if defined(WITH_TKMIB)
28
RUN_DEPEND=	${SITE_PERL}/${PERL_ARCH}/Tk.pm:${PORTSDIR}/x11-toolkits/p5-Tk
29
.endif
30
18
USE_REINPLACE=	yes
31
USE_REINPLACE=	yes
19
USE_AUTOCONF_VER=257
32
USE_AUTOCONF_VER=257
20
USE_LIBTOOL=	yes
33
USE_LIBTOOL=	yes
Lines 26-52 Link Here
26
USE_PERL5=	yes
39
USE_PERL5=	yes
27
.endif
40
.endif
28
41
29
CONFIGURE_ARGS+=--enable-shared --with-mib-modules="${NET_SNMP_MIB_MODULES}" \
42
CONFIGURE_ENV+=	PERLPROG="${PERL}" PSPROG="${PS_CMD}" SED="${SED}"
43
CONFIGURE_ARGS+=--enable-shared --enable-internal-md5 \
44
		--with-mib-modules="${_NET_SNMP_MIB_MODULES}" \
30
		--with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
45
		--with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
31
		--with-sys-contact="${NET_SNMP_SYS_CONTACT}" \
46
		--with-sys-contact="${NET_SNMP_SYS_CONTACT}" \
32
		--with-sys-location="${NET_SNMP_SYS_LOCATION}" \
47
		--with-sys-location="${NET_SNMP_SYS_LOCATION}" \
33
		--with-logfile="${NET_SNMP_LOGFILE}" \
48
		--with-logfile="${NET_SNMP_LOGFILE}" \
34
		--with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
49
		--with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
35
		--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat" \
50
		--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat"
36
		--with-defaults
51
52
.if defined(BATCH)
53
CONFIGURE_ARGS+=--with-defaults
54
.endif
55
56
.if !defined(WITHOUT_DUMMY_VALUES)
57
CONFIGURE_ARGS+=--with-dummy-values
58
.endif
59
60
.include <bsd.port.pre.mk>
61
37
.if defined(WITHOUT_PERL)
62
.if defined(WITHOUT_PERL)
38
PLIST_SUB+=	WITHPERL="@comment "
63
PLIST_SUB+=	WITH_PERL="@comment "
64
.else
65
CONFIGURE_ARGS+=--enable-embedded-perl --with-perl-modules
66
PLIST_SUB+=	WITH_PERL=""
67
.endif
68
69
.if defined(WITH_TKMIB)
70
PLIST_SUB+=	WITH_TKMIB=""
71
.else
72
PLIST_SUB+=	WITH_TKMIB="@comment "
73
.endif
74
75
.if ${OSVERSION} >= 400014 && !defined(WITHOUT_IPV6)
76
CONFIGURE_ARGS+=--enable-ipv6
77
# --with-transport="UDPIPv6 TCPIPv6" --with-modules=mibII/ipv6"
78
PLIST_SUB+=	WITH_IPV6=""
39
.else
79
.else
40
CONFIGURE_ARGS+=	--with-perl-modules
80
PLIST_SUB+=	WITH_IPV6="@comment "
41
PLIST_SUB+=	WITHPERL=""
42
.endif
81
.endif
43
82
83
SHLIB_VERSION=	6
84
PLIST_SUB+=	SHLIB_VERSION=${SHLIB_VERSION}
85
LIBTOOL_SUB=	LTCONFIG=${LIBTOOL_SHAREDIR}/ltconfig${LIBTOOL_VERSION} \
86
		LTMAIN=${LIBTOOL_SHAREDIR}/ltmain.sh
87
SCRIPTS_SUB=	PREFIX=${PREFIX} PERL=${PERL}
88
RC_SCRIPTS_SUB=	PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
89
44
DEFAULT_SNMP_VERSION?=	3
90
DEFAULT_SNMP_VERSION?=	3
45
NET_SNMP_SYS_CONTACT?=	nobody@no.where
91
NET_SNMP_SYS_CONTACT?=	nobody@nowhere.invalid
46
NET_SNMP_SYS_LOCATION?=
92
NET_SNMP_SYS_LOCATION?=	somewhere
47
NET_SNMP_LOGFILE?=	/var/log/snmpd.log
93
NET_SNMP_LOGFILE?=	/var/log/snmpd.log
48
NET_SNMP_PERSISTENTDIR?=/var/net-snmp
94
NET_SNMP_PERSISTENTDIR?=/var/net-snmp
49
NET_SNMP_MIB_MODULES?=	host smux ucd-snmp/diskio
95
NET_SNMP_MIB_MODULES?=	${NET_SNMP_MIB_MODULE_LIST}
96
97
NET_SNMP_MIB_MODULE_LIST=host disman/event-mib smux mibII/mta_sendmail ucd-snmp/diskio
98
_NET_SNMP_MIB_MODULES=
99
.for module1 in ${NET_SNMP_MIB_MODULE_LIST}
100
_module1=${module1}
101
_define= false
102
. for module2 in ${NET_SNMP_MIB_MODULES}
103
_module2=${module2}
104
.  if ${_module1} == ${_module2}
105
_define= true
106
.  endif
107
. endfor
108
. if ${_define} == true
109
_NET_SNMP_MIB_MODULES+= ${module1}
110
PLIST_SUB+=	WITH_${module1:C|.*/||:U}=""
111
. else
112
PLIST_SUB+=	WITH_${module1:C|.*/||:U}="@comment "
113
. endif
114
.endfor
50
115
51
MAN1=		mib2c.1 \
116
MAN1=		mib2c.1 \
52
		snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 \
117
		snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 \
Lines 86-146 Link Here
86
		netsnmp_stash_cache.3 netsnmp_utilities.3
151
		netsnmp_stash_cache.3 netsnmp_utilities.3
87
152
88
.if !defined(WITHOUT_PERL)
153
.if !defined(WITHOUT_PERL)
89
MAN3PERL=	NetSNMP::default_store.3 NetSNMP::ASN.3 NetSNMP::OID.3 \
154
MAN3PERL=	NetSNMP::ASN.3 NetSNMP::OID.3 NetSNMP::agent.3 \
90
		NetSNMP::agent::default_store.3 \
155
		NetSNMP::agent::default_store.3 \
91
		NetSNMP::netsnmp_request_infoPtr.3 \
156
		NetSNMP::default_store.3 \
92
		NetSNMP::agent.3 SNMP.3
157
		NetSNMP::netsnmp_request_infoPtr.3 SNMP.3
93
MAN3PERLPREFIX=	${PREFIX}/lib/perl5/${PERL_VERSION}
158
MAN3PERLPREFIX=	${PREFIX}/lib/perl5/${PERL_VERSION}
94
_MANPAGES+=	${MAN3PERL:S%^%${MAN3PERLPREFIX}/man/man3/%}
159
_MANPAGES+=	${MAN3PERL:S%^%${MAN3PERLPREFIX}/man/man3/%}
95
.endif
160
.endif
161
96
MAN5=		snmp.conf.5 snmp_config.5 snmpd.conf.5 \
162
MAN5=		snmp.conf.5 snmp_config.5 snmpd.conf.5 \
97
		snmptrapd.conf.5 variables.5
163
		snmptrapd.conf.5 variables.5
98
MAN8=		snmpd.8 snmptrapd.8
164
MAN8=		snmpd.8 snmptrapd.8
99
BIN=		snmpbulkwalk snmpget snmpgetnext snmpnetstat snmpset \
165
166
BIN_FILES=	snmpbulkwalk snmpget snmpgetnext snmpnetstat snmpset \
100
		snmpstatus snmptest snmptranslate snmptrap snmpwalk
167
		snmpstatus snmptest snmptranslate snmptrap snmpwalk
101
SBIN=		snmpd snmptrapd
168
SBIN_FILES=	snmpd snmptrapd
169
STARTUP_DIR=	${PREFIX}/etc/rc.d
170
STARTUP_FILES=	snmpd.sh snmptrapd.sh
171
SCRIPT_FILES=	snmpcheck.def mib2c fixproc ipf-mod.pl snmpconf \
172
		traptoemail
173
.if defined(WITH_TKMIB)
174
SCRIPT_FILES+=	tkmib
175
.endif
176
DOC_FILES=	AGENT.txt COPYING FAQ NEWS README \
177
		README.agentx README.krb5 README.snmpv3 README.thread \
178
		agent/mibgroup/README.smux
179
180
PS_CMD?=	/bin/ps
181
182
pre-everything::
183
	@${ECHO_MSG}
184
	@${ECHO_MSG} "You may use the following build options:"
185
	@${ECHO_MSG}
186
	@${ECHO_MSG} "WITH_INETADDRESS_HACK=yes	builds with the inetaddress hack"
187
	@${ECHO_MSG} "WITH_TKMIB=yes		Install a graphical Perl/Tk/SNMP based mib browser"
188
	@${ECHO_MSG} "WITHOUT_DUMMY_VALUES=yes	Provide 'placeholder' dummy values where"
189
	@${ECHO_MSG} "				the necessary information is not available."
190
	@${ECHO_MSG} "WITHOUT_PERL=yes		Install the perl modules along with the rest"
191
	@${ECHO_MSG} "				of the net-snmp toolkit."
192
	@${ECHO_MSG} "WITHOUT_IPV6=yes		Generate IPv6 ready version."
193
	@${ECHO_MSG}
194
	@${ECHO_MSG} "DEFAULT_SNMP_VERSION=\"3\"	Default version of SNMP to use."
195
	@${ECHO_MSG} "NET_SNMP_SYS_CONTACT=\"${NET_SNMP_SYS_CONTACT}\""
196
	@${ECHO_MSG} "				Default system contact."
197
	@${ECHO_MSG} "NET_SNMP_SYS_LOCATION=\"${NET_SNMP_SYS_LOCATION}\""
198
	@${ECHO_MSG} "				Default system location."
199
	@${ECHO_MSG} "NET_SNMP_LOGFILE=\"${NET_SNMP_LOGFILE}\""
200
	@${ECHO_MSG} "				Default log file location for snmpd."
201
	@${ECHO_MSG} "NET_SNMP_PERSISTENTDIR=\"${NET_SNMP_PERSISTENTDIR}\""
202
	@${ECHO_MSG} "				Default directory for persistent data storage."
203
	@${ECHO_MSG} "NET_SNMP_MIB_MODULES=\"${NET_SNMP_MIB_MODULE_LIST}\""
204
	@${ECHO_MSG} "				Optional mib modules that can be built into the"
205
	@${ECHO_MSG} "				agent"
206
	@${ECHO_MSG}
102
207
103
STARTUP_FILE=	${PREFIX}/etc/rc.d/snmpd.sh
208
post-patch: patch-autoconf patch-script-files patch-startup-files
104
209
105
.include <bsd.port.pre.mk>
210
patch-autoconf:
106
211
	@${REINPLACE_CMD} ${LIBTOOL_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
107
.if ${OSVERSION} >= 400014
212
		${WRKSRC}/aclocal.m4
108
CONFIGURE_ARGS+=--enable-ipv6 \
109
		--with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix"
110
.endif
111
213
112
SHLIB_VERSION=	6
214
patch-script-files:
113
PLIST_SUB+=	shlib=${SHLIB_VERSION}
215
.for file in ${SCRIPT_FILES}
114
RC_SCRIPTS_SUB=	PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
216
	@${REINPLACE_CMD} ${SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
217
		${WRKSRC}/local/${file}
218
.endfor
115
219
116
.if defined(WITH_INETADDRESS_HACK)
220
patch-startup-files:
117
EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-snmplib::mib.c
221
.for file in ${STARTUP_FILES}
118
.endif
222
	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
223
		${FILESDIR}/${file}.sample > ${WRKDIR}/${file}
224
.endfor
119
225
120
post-patch:
226
post-configure:
121
	@${REINPLACE_CMD} \
227
	@${FIND} ${WRKSRC} -name Makefile | \
122
		-e 's|%%LTCONFIG%%|${LIBTOOL_SHAREDIR}/ltconfig${LIBTOOL_VERSION}|g' \
228
	 ${XARGS} ${PERL} -pi -e 's|$$| -m 755| if /^INSTALL\s+=/'
123
		-e 's|%%LTMAIN%%|${LIBTOOL_SHAREDIR}/ltmain.sh|g' \
124
		${WRKSRC}/aclocal.m4
125
229
126
.if !defined(WITHOUT_PERL)
230
.if !defined(WITHOUT_PERL)
127
post-build:
231
post-build:
128
	@${FIND} ${CONFIGURE_WRKSRC}/perl -name Makefile | \
232
	${FIND} ${WRKSRC}/perl -name Makefile | \
129
	 ${XARGS} ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//'
233
	 ${XARGS} ${PERL} -pi -e '\
234
		s!^(PREFIX) = /usr/local!$$1 = ${PREFIX}!; \
235
		s!^(INSTALLMAN3DIR) = /usr/local!$$1 = \$$\(PREFIX\)!; \
236
		s! doc_(perl|site|\$$\(INSTALLDIRS\))_install$$!!; \
237
		'
238
.endif
239
240
post-install: strip-files install-startup-files install-doc-files display-message
241
242
strip-files:
243
	@cd ${PREFIX}/bin; ${STRIP_CMD} ${BIN_FILES}
244
	@cd ${PREFIX}/sbin; ${STRIP_CMD} ${SBIN_FILES}
245
246
install-startup-files:
247
.for file in ${STARTUP_FILES}
248
	@${INSTALL_SCRIPT} ${WRKDIR}/${file} ${STARTUP_DIR}
249
.endfor
250
251
install-doc-files:
252
.if !defined(NOPORTDOCS)
253
	@${MKDIR} ${DOCSDIR}
254
. for file in ${DOC_FILES}
255
	@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
256
. endfor
130
.endif
257
.endif
131
258
132
pre-install:
259
display-message:
133
	-@[ -f ${STARTUP_FILE} ] && \
134
	 (${ECHO} "Remove old ${STARTUP_FILE} before install." && exit 1)
135
136
post-install:
137
	@( cd ${PREFIX}/bin && ${STRIP_CMD} ${BIN} )
138
	@( cd ${PREFIX}/sbin && ${STRIP_CMD} ${SBIN} )
139
	@${FIND} ${PREFIX}/include/net-snmp ${PREFIX}/share/snmp/mibs -type f \
140
		| ${XARGS} ${CHMOD} 644
141
	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
142
		${FILESDIR}/snmpd.sh.sample > ${STARTUP_FILE}
143
	@${CHMOD} 755 ${STARTUP_FILE}
144
	@${ECHO_MSG}
260
	@${ECHO_MSG}
145
	@${CAT} ${PKGMESSAGE}
261
	@${CAT} ${PKGMESSAGE}
146
262
(-)pkg-descr (-1 / +1 lines)
Lines 7-12 Link Here
7
    tools to request or set information from SNMP agents 
7
    tools to request or set information from SNMP agents 
8
    tools to generate and handle SNMP traps 
8
    tools to generate and handle SNMP traps 
9
    a version of the unix 'netstat' command using SNMP 
9
    a version of the unix 'netstat' command using SNMP 
10
    a Tk/perl mib browser 
10
    a graphical Perl/Tk/SNMP based mib browser
11
11
12
WWW: http://net-snmp.sourceforge.net/
12
WWW: http://net-snmp.sourceforge.net/
(-)pkg-message (-8 / +11 lines)
Lines 1-23 Link Here
1
**** This port installs snmp daemon, include files and libraries but not
1
**** This port installs snmp daemon, header files and libraries but don't
2
     invoking snmpd by default.
2
     invokes snmpd by default.
3
     If you want to invoke snmpd from startup, put these lines into
3
     If you want to invoke snmpd and/or snmptrapd at startup, put these
4
     /etc/rc.conf.
4
     lines into /etc/rc.conf.
5
5
6
	snmpd_enable="YES"
6
	snmpd_enable="YES"
7
	snmpd_flags=""
7
	snmpd_flags="-as -p /var/run/snmpd.pid"
8
	snmptrapd_enable="YES"
9
	snmptrapd_flags="-as -p /var/run/snmptrapd.pid"
8
10
9
**** You can specify make variables as:
11
**** You may specify the following make variables:
10
12
11
	NET_SNMP_SYS_CONTACT="kuriyama@FreeBSD.org"
13
	NET_SNMP_SYS_CONTACT="kuriyama@FreeBSD.org"
12
	NET_SNMP_SYS_LOCATION="Tokyo, Japan"
14
	NET_SNMP_SYS_LOCATION="Tokyo, Japan"
13
	DEFAULT_SNMP_VERSION=3
15
	DEFAULT_SNMP_VERSION=3
16
	NET_SNMP_MIB_MODULES="host smux mibII/mta_sendmail ucd-snmp/diskio"
14
	NET_SNMP_LOGFILE=/var/log/snmpd.log
17
	NET_SNMP_LOGFILE=/var/log/snmpd.log
15
	NET_SNMP_PERSISTENTDIR=/var/net-snmp
18
	NET_SNMP_PERSISTENTDIR=/var/net-snmp
16
19
17
     to define default values (or overwriting defaults).  At least
20
     to define default values (or overwriting defaults).  At least
18
     setting first two variables, you will not be prompted during
21
     setting first two variables, you will not be prompted during
19
     configuration process.  Or you can set
22
     configuration process.  You may also set
20
23
21
	BATCH="yes"
24
	BATCH="yes"
22
25
23
     to make to avoid interactive configuration.
26
     to avoid interactive configuration.
(-)pkg-plist (-144 / +167 lines)
Lines 22-29 Link Here
22
bin/snmpusm
23
bin/snmpusm
23
bin/snmpvacm
24
bin/snmpvacm
24
bin/snmpwalk
25
bin/snmpwalk
26
%%WITH_TKMIB%%bin/tkmib
25
bin/traptoemail
27
bin/traptoemail
26
etc/rc.d/snmpd.sh
28
etc/rc.d/snmpd.sh
29
etc/rc.d/snmptrapd.sh
30
@exec mkdir %D/etc/snmp 2>/dev/null || true
27
include/net-snmp/agent/agent_callbacks.h
31
include/net-snmp/agent/agent_callbacks.h
28
include/net-snmp/agent/agent_handler.h
32
include/net-snmp/agent/agent_handler.h
29
include/net-snmp/agent/agent_index.h
33
include/net-snmp/agent/agent_index.h
Lines 91-99 Link Here
91
include/net-snmp/library/snmp.h
95
include/net-snmp/library/snmp.h
92
include/net-snmp/library/snmpCallbackDomain.h
96
include/net-snmp/library/snmpCallbackDomain.h
93
include/net-snmp/library/snmpTCPDomain.h
97
include/net-snmp/library/snmpTCPDomain.h
94
include/net-snmp/library/snmpTCPIPv6Domain.h
98
%%WITH_IPV6%%include/net-snmp/library/snmpTCPIPv6Domain.h
95
include/net-snmp/library/snmpUDPDomain.h
99
include/net-snmp/library/snmpUDPDomain.h
96
include/net-snmp/library/snmpUDPIPv6Domain.h
100
%%WITH_IPV6%%include/net-snmp/library/snmpUDPIPv6Domain.h
97
include/net-snmp/library/snmpUnixDomain.h
101
include/net-snmp/library/snmpUnixDomain.h
98
include/net-snmp/library/snmp_alarm.h
102
include/net-snmp/library/snmp_alarm.h
99
include/net-snmp/library/snmp_api.h
103
include/net-snmp/library/snmp_api.h
Lines 158-309 Link Here
158
include/net-snmp/utilities.h
162
include/net-snmp/utilities.h
159
include/net-snmp/varbind_api.h
163
include/net-snmp/varbind_api.h
160
include/net-snmp/version.h
164
include/net-snmp/version.h
161
@dirrm include/net-snmp/agent
162
@dirrm include/net-snmp/library
163
@dirrm include/net-snmp/machine
164
@dirrm include/net-snmp/system
165
@dirrm include/net-snmp
166
lib/libnetsnmp.a
165
lib/libnetsnmp.a
167
lib/libnetsnmp.so
166
lib/libnetsnmp.so.%%SHLIB_VERSION%%
168
lib/libnetsnmp.so.%%shlib%%
167
@exec ln -fs libnetsnmp.so.%%SHLIB_VERSION%% %B/libnetsnmp.so
168
@unexec rm -f %B/libnetsnmp.so 2> /dev/null || true
169
lib/libnetsnmpagent.a
169
lib/libnetsnmpagent.a
170
lib/libnetsnmpagent.so
170
lib/libnetsnmpagent.so.%%SHLIB_VERSION%%
171
lib/libnetsnmpagent.so.%%shlib%%
171
@exec ln -fs libnetsnmpagent.so.%%SHLIB_VERSION%% %B/libnetsnmpagent.so
172
@unexec rm -f %B/libnetsnmpagent.so 2> /dev/null || true
172
lib/libnetsnmphelpers.a
173
lib/libnetsnmphelpers.a
173
lib/libnetsnmphelpers.so
174
lib/libnetsnmphelpers.so.%%SHLIB_VERSION%%
174
lib/libnetsnmphelpers.so.%%shlib%%
175
@exec ln -fs libnetsnmphelpers.so.%%SHLIB_VERSION%% %B/libnetsnmphelpers.so
176
@unexec rm -f %B/libnetsnmphelpers.so 2> /dev/null || true
175
lib/libnetsnmpmibs.a
177
lib/libnetsnmpmibs.a
176
lib/libnetsnmpmibs.so
178
lib/libnetsnmpmibs.so.%%SHLIB_VERSION%%
177
lib/libnetsnmpmibs.so.%%shlib%%
179
@exec ln -fs libnetsnmpmibs.so.%%SHLIB_VERSION%% %B/libnetsnmpmibs.so
180
@unexec rm -f %B/libnetsnmpmibs.so 2> /dev/null || true
178
lib/libnetsnmptrapd.a
181
lib/libnetsnmptrapd.a
179
lib/libnetsnmptrapd.so
182
lib/libnetsnmptrapd.so.%%SHLIB_VERSION%%
180
lib/libnetsnmptrapd.so.%%shlib%%
183
@exec ln -fs libnetsnmptrapd.so.%%SHLIB_VERSION%% %B/libnetsnmptrapd.so
184
@unexec rm -f %B/libnetsnmptrapd.so 2> /dev/null || true
185
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Bundle/Makefile.subs.pl
186
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/ASN.pm
187
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/OID.pm
188
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent.pm
189
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/default_store.pm
190
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/netsnmp_request_infoPtr.pm
191
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/default_store.pm
192
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/SNMP.pm
193
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP/.packlist
194
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.bs
195
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.so
196
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/autosplit.ix
197
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.bs
198
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.so
199
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/autosplit.ix
200
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.bs
201
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.so
202
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/autosplit.ix
203
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/autosplit.ix
204
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.bs
205
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.so
206
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/autosplit.ix
207
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.bs
208
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.so
209
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.bs
210
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.so
211
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/autosplit.ix
181
sbin/snmpd
212
sbin/snmpd
182
sbin/snmptrapd
213
sbin/snmptrapd
183
share/snmp/mib2c.access_functions.conf
214
%%PORTDOCS%%%%DOCSDIR%%/AGENT.txt
184
share/snmp/mib2c.array-user.conf
215
%%PORTDOCS%%%%DOCSDIR%%/COPYING
185
share/snmp/mib2c.check_values.conf
216
%%PORTDOCS%%%%DOCSDIR%%/FAQ
186
share/snmp/mib2c.check_values_local.conf
217
%%PORTDOCS%%%%DOCSDIR%%/NEWS
187
share/snmp/mib2c.column_defines.conf
218
%%PORTDOCS%%%%DOCSDIR%%/README
188
share/snmp/mib2c.column_enums.conf
219
%%PORTDOCS%%%%DOCSDIR%%/README.agentx
189
share/snmp/mib2c.conf
220
%%PORTDOCS%%%%DOCSDIR%%/README.krb5
190
share/snmp/mib2c.create-dataset.conf
221
%%PORTDOCS%%%%DOCSDIR%%/README.snmpv3
191
share/snmp/mib2c.int_watch.conf
222
%%PORTDOCS%%%%DOCSDIR%%/README.thread
192
share/snmp/mib2c.iterate.conf
223
%%PORTDOCS%%%%DOCSDIR%%/README.smux
193
share/snmp/mib2c.iterate_access.conf
224
%%DATADIR%%/mib2c.access_functions.conf
194
share/snmp/mib2c.old-api.conf
225
%%DATADIR%%/mib2c.array-user.conf
195
share/snmp/mib2c.scalar.conf
226
%%DATADIR%%/mib2c.check_values.conf
196
share/snmp/mibs/AGENTX-MIB.txt
227
%%DATADIR%%/mib2c.check_values_local.conf
197
share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
228
%%DATADIR%%/mib2c.column_defines.conf
198
share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
229
%%DATADIR%%/mib2c.column_enums.conf
199
share/snmp/mibs/EtherLike-MIB.txt
230
%%DATADIR%%/mib2c.conf
200
share/snmp/mibs/HCNUM-TC.txt
231
%%DATADIR%%/mib2c.create-dataset.conf
201
share/snmp/mibs/HOST-RESOURCES-MIB.txt
232
%%DATADIR%%/mib2c.int_watch.conf
202
share/snmp/mibs/HOST-RESOURCES-TYPES.txt
233
%%DATADIR%%/mib2c.iterate.conf
203
share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
234
%%DATADIR%%/mib2c.iterate_access.conf
204
share/snmp/mibs/IANA-LANGUAGE-MIB.txt
235
%%DATADIR%%/mib2c.old-api.conf
205
share/snmp/mibs/IANAifType-MIB.txt
236
%%DATADIR%%/mib2c.scalar.conf
206
share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
237
%%DATADIR%%/mibs/AGENTX-MIB.txt
207
share/snmp/mibs/IF-MIB.txt
238
%%WITH_EVENT-MIB%%%%DATADIR%%/mibs/DISMAN-EVENT-MIB.txt
208
share/snmp/mibs/INET-ADDRESS-MIB.txt
239
%%DATADIR%%/mibs/DISMAN-SCHEDULE-MIB.txt
209
share/snmp/mibs/IP-FORWARD-MIB.txt
240
%%DATADIR%%/mibs/DISMAN-SCRIPT-MIB.txt
210
share/snmp/mibs/IP-MIB.txt
241
%%DATADIR%%/mibs/EtherLike-MIB.txt
211
share/snmp/mibs/IPV6-ICMP-MIB.txt
242
%%DATADIR%%/mibs/HCNUM-TC.txt
212
share/snmp/mibs/IPV6-MIB.txt
243
%%DATADIR%%/mibs/HOST-RESOURCES-MIB.txt
213
share/snmp/mibs/IPV6-TC.txt
244
%%DATADIR%%/mibs/HOST-RESOURCES-TYPES.txt
214
share/snmp/mibs/IPV6-TCP-MIB.txt
245
%%DATADIR%%/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
215
share/snmp/mibs/IPV6-UDP-MIB.txt
246
%%DATADIR%%/mibs/IANA-LANGUAGE-MIB.txt
216
share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
247
%%DATADIR%%/mibs/IANAifType-MIB.txt
217
share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
248
%%DATADIR%%/mibs/IF-INVERTED-STACK-MIB.txt
218
share/snmp/mibs/NET-SNMP-MIB.txt
249
%%DATADIR%%/mibs/IF-MIB.txt
219
share/snmp/mibs/NET-SNMP-TC.txt
250
%%DATADIR%%/mibs/INET-ADDRESS-MIB.txt
220
share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
251
%%DATADIR%%/mibs/IP-FORWARD-MIB.txt
221
share/snmp/mibs/RFC-1215.txt
252
%%DATADIR%%/mibs/IP-MIB.txt
222
share/snmp/mibs/RFC1155-SMI.txt
253
%%DATADIR%%/mibs/IPV6-ICMP-MIB.txt
223
share/snmp/mibs/RFC1213-MIB.txt
254
%%DATADIR%%/mibs/IPV6-MIB.txt
224
share/snmp/mibs/RMON-MIB.txt
255
%%DATADIR%%/mibs/IPV6-TC.txt
225
share/snmp/mibs/SMUX-MIB.txt
256
%%DATADIR%%/mibs/IPV6-TCP-MIB.txt
226
share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
257
%%DATADIR%%/mibs/IPV6-UDP-MIB.txt
227
share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
258
%%WITH_MTA_SENDMAIL%%%%DATADIR%%/mibs/MTA-MIB.txt
228
share/snmp/mibs/SNMP-MPD-MIB.txt
259
%%DATADIR%%/mibs/NET-SNMP-AGENT-MIB.txt
229
share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
260
%%DATADIR%%/mibs/NET-SNMP-EXAMPLES-MIB.txt
230
share/snmp/mibs/SNMP-PROXY-MIB.txt
261
%%DATADIR%%/mibs/NET-SNMP-MIB.txt
231
share/snmp/mibs/SNMP-TARGET-MIB.txt
262
%%DATADIR%%/mibs/NET-SNMP-TC.txt
232
share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
263
%%WITH_MTA_SENDMAIL%%%%DATADIR%%/mibs/NETWORK-SERVICES-MIB.txt
233
share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
264
%%DATADIR%%/mibs/NOTIFICATION-LOG-MIB.txt
234
share/snmp/mibs/SNMPv2-CONF.txt
265
%%DATADIR%%/mibs/RFC-1215.txt
235
share/snmp/mibs/SNMPv2-MIB.txt
266
%%DATADIR%%/mibs/RFC1155-SMI.txt
236
share/snmp/mibs/SNMPv2-SMI.txt
267
%%DATADIR%%/mibs/RFC1213-MIB.txt
237
share/snmp/mibs/SNMPv2-TC.txt
268
%%DATADIR%%/mibs/RMON-MIB.txt
238
share/snmp/mibs/SNMPv2-TM.txt
269
%%DATADIR%%/mibs/SMUX-MIB.txt
239
share/snmp/mibs/TCP-MIB.txt
270
%%DATADIR%%/mibs/SNMP-COMMUNITY-MIB.txt
240
share/snmp/mibs/UCD-DEMO-MIB.txt
271
%%DATADIR%%/mibs/SNMP-FRAMEWORK-MIB.txt
241
share/snmp/mibs/UCD-DISKIO-MIB.txt
272
%%DATADIR%%/mibs/SNMP-MPD-MIB.txt
242
share/snmp/mibs/UCD-DLMOD-MIB.txt
273
%%DATADIR%%/mibs/SNMP-NOTIFICATION-MIB.txt
243
share/snmp/mibs/UCD-IPFWACC-MIB.txt
274
%%DATADIR%%/mibs/SNMP-PROXY-MIB.txt
244
share/snmp/mibs/UCD-SNMP-MIB.txt
275
%%DATADIR%%/mibs/SNMP-TARGET-MIB.txt
245
share/snmp/mibs/UDP-MIB.txt
276
%%DATADIR%%/mibs/SNMP-USER-BASED-SM-MIB.txt
246
@unexec rm -f %D/share/snmp/mibs/.index 2>/dev/null || true
277
%%DATADIR%%/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
247
share/snmp/snmpconf-data/snmp-data/authopts
278
%%DATADIR%%/mibs/SNMPv2-CONF.txt
248
share/snmp/snmpconf-data/snmp-data/debugging
279
%%DATADIR%%/mibs/SNMPv2-MIB.txt
249
share/snmp/snmpconf-data/snmp-data/mibs
280
%%DATADIR%%/mibs/SNMPv2-SMI.txt
250
share/snmp/snmpconf-data/snmp-data/output
281
%%DATADIR%%/mibs/SNMPv2-TC.txt
251
share/snmp/snmpconf-data/snmp-data/snmpconf-config
282
%%DATADIR%%/mibs/SNMPv2-TM.txt
252
share/snmp/snmpconf-data/snmpd-data/acl
283
%%DATADIR%%/mibs/TCP-MIB.txt
253
share/snmp/snmpconf-data/snmpd-data/basic_setup
284
%%DATADIR%%/mibs/UCD-DEMO-MIB.txt
254
share/snmp/snmpconf-data/snmpd-data/extending
285
%%DATADIR%%/mibs/UCD-DISKIO-MIB.txt
255
share/snmp/snmpconf-data/snmpd-data/monitor
286
%%DATADIR%%/mibs/UCD-DLMOD-MIB.txt
256
share/snmp/snmpconf-data/snmpd-data/operation
287
%%DATADIR%%/mibs/UCD-IPFWACC-MIB.txt
257
share/snmp/snmpconf-data/snmpd-data/snmpconf-config
288
%%DATADIR%%/mibs/UCD-SNMP-MIB.txt
258
share/snmp/snmpconf-data/snmpd-data/system
289
%%DATADIR%%/mibs/UDP-MIB.txt
259
share/snmp/snmpconf-data/snmpd-data/trapsinks
290
@unexec rm -f %D/%%DATADIR%%/mibs/.index 2>/dev/null || true
260
share/snmp/snmpconf-data/snmptrapd-data/formatting
291
%%WITH_PERL%%%%DATADIR%%/snmp_perl.pl
261
share/snmp/snmpconf-data/snmptrapd-data/snmpconf-config
292
%%DATADIR%%/snmpconf-data/snmp-data/authopts
262
share/snmp/snmpconf-data/snmptrapd-data/traphandle
293
%%DATADIR%%/snmpconf-data/snmp-data/debugging
263
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.so
294
%%DATADIR%%/snmpconf-data/snmp-data/mibs
264
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.bs
295
%%DATADIR%%/snmpconf-data/snmp-data/output
265
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/autosplit.ix
296
%%DATADIR%%/snmpconf-data/snmp-data/snmpconf-config
266
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.so
297
%%DATADIR%%/snmpconf-data/snmpd-data/acl
267
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.bs
298
%%DATADIR%%/snmpconf-data/snmpd-data/basic_setup
268
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/autosplit.ix
299
%%DATADIR%%/snmpconf-data/snmpd-data/extending
269
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.so
300
%%DATADIR%%/snmpconf-data/snmpd-data/monitor
270
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.bs
301
%%DATADIR%%/snmpconf-data/snmpd-data/operation
271
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/autosplit.ix
302
%%DATADIR%%/snmpconf-data/snmpd-data/snmpconf-config
272
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.so
303
%%DATADIR%%/snmpconf-data/snmpd-data/system
273
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.bs
304
%%DATADIR%%/snmpconf-data/snmpd-data/trapsinks
274
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.so
305
%%DATADIR%%/snmpconf-data/snmptrapd-data/formatting
275
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.bs
306
%%DATADIR%%/snmpconf-data/snmptrapd-data/snmpconf-config
276
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/autosplit.ix
307
%%DATADIR%%/snmpconf-data/snmptrapd-data/traphandle
277
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/autosplit.ix
308
@dirrm %%DATADIR%%/snmpconf-data/snmptrapd-data
278
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.so
309
@dirrm %%DATADIR%%/snmpconf-data/snmpd-data
279
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.bs
310
@dirrm %%DATADIR%%/snmpconf-data/snmp-data
280
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/autosplit.ix
311
@dirrm %%DATADIR%%/snmpconf-data
281
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP/.packlist
312
@unexec rmdir %D/%%DATADIR%%/mibs 2>/dev/null || true
282
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Bundle/Makefile.subs.pl
313
@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
283
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/default_store.pm
314
%%PORTDOCS%%@dirrm %%DOCSDIR%%
284
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/ASN.pm
315
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP
285
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/OID.pm
316
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store
286
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/netsnmp_request_infoPtr.pm
317
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store
287
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/default_store.pm
318
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent
288
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent.pm
319
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID
289
%%WITHPERL%%%%SITE_PERL%%/%%PERL_ARCH%%/SNMP.pm
320
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN
290
@dirrm share/snmp/snmpconf-data/snmp-data
321
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP
291
@dirrm share/snmp/snmpconf-data/snmpd-data
322
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP
292
@dirrm share/snmp/snmpconf-data/snmptrapd-data
323
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle 2>/dev/null || true
293
@dirrm share/snmp/snmpconf-data
324
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto 2>/dev/null || true
294
@dirrm share/snmp/mibs
325
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent
295
@unexec rmdir %D/share/snmp 2>/dev/null || true
326
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP
296
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store
327
%%WITH_PERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/Bundle 2>/dev/null || true
297
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN
328
@dirrm include/net-snmp/system
298
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID
329
@dirrm include/net-snmp/machine
299
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store
330
@dirrm include/net-snmp/library
300
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent
331
@dirrm include/net-snmp/agent
301
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP
332
@dirrm include/net-snmp
302
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP
333
@unexec rmdir %D/etc/snmp 2>/dev/null || true
303
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP
304
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle 2>/dev/null || true
305
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto 2>/dev/null || true
306
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/Bundle 2>/dev/null || true
307
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent
308
%%WITHPERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP
309
%%WITHPERL%%@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP 2>/dev/null || true
(-)files/patch-configure.in (-12 / +40 lines)
Lines 1-19 Link Here
1
--- configure.in.orig	Fri Nov 14 13:32:10 2003
1
--- configure.in.orig	Thu Mar  6 07:41:13 2003
2
+++ configure.in	Fri Nov 14 13:36:27 2003
2
+++ configure.in	Tue May 27 14:53:22 2003
3
@@ -1357,7 +1357,7 @@
3
@@ -1246,7 +1246,7 @@
4
   # fall back
4
   dnl fall back
5
   CFLAG="-f"
5
   CFLAG="-f"
6
 fi
6
 fi
7
-for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel
7
-for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel
8
+for i in /vmunix /hp-ux /stand/vmunix /dev/ksyms /kernel/unix /kernel/genunix /netbsd /unix /kernel /bsd /mach_kernel /boot/kernel/kernel
8
+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
9
   do
9
   do
10
   if test -f $i -o $CFLAG $i; then
10
   if test -f $i -o $CFLAG $i; then
11
     ac_cv_KERNEL_LOC="$i"
11
     ac_cv_KERNEL_LOC="$i"
12
@@ -1376,6 +1376,7 @@
12
@@ -1659,7 +1659,7 @@
13
 # Check for mount table location
13
 AC_HEADER_SYS_WAIT
14
 #
14
 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)
15
 # FreeBSD required headers
16
-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)
17
+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)
18
 # Linux
19
 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)
20
 # NetBSD required headers
21
@@ -1866,6 +1866,26 @@
22
 dnl checking for 4.3 vs 4.4 rtentry.
23
 AC_CACHE_CHECK(type of rtentry structure,ac_cv_RTENTRY_TYPE,
24
 [
25
+
26
+dnl 4.4 compatible but renamed on FreeBSD
27
+AC_TRY_COMPILE([
28
+#include <sys/types.h>
29
+#define KERNEL
30
+#define _KERNEL
31
+#include <sys/socket.h>
32
+#undef KERNEL
33
+#undef _KERNEL
34
+#include <net/route.h>
35
+],[
36
+
37
+#ifndef STRUCT_RTENTRY_HAS_RT_DST
38
+#define rt_dst rt_nodes->rn_key
39
+#endif
40
+
41
+  struct rtentry rt; 
42
+  rt.rt_nodes[0].rn_bit = 1;
43
+  rt.rt_dst;
44
+  ], ac_cv_RTENTRY_TYPE="BSD-4.4")
15
 
45
 
16
+# kuriyama: should /var/db/mounttab be used?
46
 dnl 4.4 compat
17
 AC_CACHE_CHECK(for mount table location,ac_cv_ETC_MNTTAB,
47
 AC_TRY_COMPILE([
18
 [ac_cv_ETC_MNTTAB="unknown"
19
 for i in /etc/mnttab /etc/mtab /etc/filesystems
(-)files/patch-hr_storage.c (-2 / +2 lines)
Lines 24-30 Link Here
24
 #elif defined(MBSTAT_SYMBOL)
24
 #elif defined(MBSTAT_SYMBOL)
25
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
25
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
26
                 long_return = mbstat.m_mbufs;
26
                 long_return = mbstat.m_mbufs;
27
+#elif __FreeBSD_version < 500024
27
+#elif defined(freebsd5) && __FreeBSD_version < 500024
28
+			/* mbuf stats disabled */
28
+			/* mbuf stats disabled */
29
+			return NULL;
29
+			return NULL;
30
+#else
30
+#else
Lines 40-46 Link Here
40
 #elif defined(MBSTAT_SYMBOL)
40
 #elif defined(MBSTAT_SYMBOL)
41
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
41
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
42
                 long_return = mbstat.m_clusters - mbstat.m_clfree;      /* unlikely, but... */
42
                 long_return = mbstat.m_clusters - mbstat.m_clfree;      /* unlikely, but... */
43
+#elif __FreeBSD_version < 500024
43
+#elif defined(freebsd5) && __FreeBSD_version < 500024
44
+			/* mbuf stats disabled */
44
+			/* mbuf stats disabled */
45
+			return NULL;
45
+			return NULL;
46
+#else
46
+#else
(-)files/patch-hr_system.c (-13 / +11 lines)
Lines 1-23 Link Here
1
--- agent/mibgroup/host/hr_system.c.orig	Fri Nov 14 14:45:55 2003
1
--- agent/mibgroup/host/hr_system.c.orig	Sat Mar  1 05:35:13 2003
2
+++ agent/mibgroup/host/hr_system.c	Fri Nov 14 14:46:01 2003
2
+++ agent/mibgroup/host/hr_system.c	Sun Feb  8 17:39:50 2004
3
@@ -276,11 +276,10 @@
3
@@ -280,7 +280,6 @@
4
     struct utmp    *utmp_p;
5
 #endif
6
 
7
+#ifndef UTMP_HAS_NO_TYPE
8
     setutent();
9
     while ((utmp_p = getutent()) != NULL) {
4
     while ((utmp_p = getutent()) != NULL) {
10
-#ifndef UTMP_HAS_NO_TYPE
5
 #ifndef UTMP_HAS_NO_TYPE
11
         if (utmp_p->ut_type == USER_PROCESS) {
6
         if (utmp_p->ut_type == USER_PROCESS) {
12
-#endif
7
-#endif
13
             /* This block of code fixes zombie user PIDs in the
8
             /* This block of code fixes zombie user PIDs in the
14
                utmp/utmpx file that would otherwise be counted as a
9
                utmp/utmpx file that would otherwise be counted as a
15
                current user */
10
                current user */
16
@@ -293,6 +292,7 @@
11
@@ -291,6 +290,10 @@
12
             }
13
             ++total;
17
         }
14
         }
15
+#else
16
+	if (*utmp_p->ut_name != '~')
17
+            ++total;
18
+#endif
18
     }
19
     }
19
     endutent();
20
     endutent();
20
+#endif
21
     return total;
21
     return total;
22
 }
23
 
(-)files/patch-memory_freebsd2.c (-6 / +8 lines)
Lines 1-12 Link Here
1
--- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig	Sat Nov  9 23:59:53 2002
1
--- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig	Sat Nov  9 15:59:53 2002
2
+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c	Sat Aug 16 17:09:01 2003
2
+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c	Sat Feb 21 11:55:05 2004
3
@@ -207,11 +207,13 @@
3
@@ -204,6 +204,7 @@
4
     if (kd == NULL)
5
         kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, NULL);
6
 
7
+#if !defined(freebsd5)
4
     auto_nlist(NSWDEV_SYMBOL, (char *) &nswdev, sizeof(nswdev));
8
     auto_nlist(NSWDEV_SYMBOL, (char *) &nswdev, sizeof(nswdev));
5
     auto_nlist(DMMAX_SYMBOL, (char *) &dmmax, sizeof(dmmax));
9
     auto_nlist(DMMAX_SYMBOL, (char *) &dmmax, sizeof(dmmax));
6
 
10
 
7
+#if !defined(freebsd5)
11
@@ -212,6 +213,7 @@
8
     sw = (struct swdevt *) malloc(nswdev * sizeof(*sw));
9
     if (sw == NULL)
10
         return;
12
         return;
11
 
13
 
12
     auto_nlist(SWDEVT_SYMBOL, (char *) sw, nswdev * sizeof(*sw));
14
     auto_nlist(SWDEVT_SYMBOL, (char *) sw, nswdev * sizeof(*sw));
(-)files/snmpd.sh.sample (-4 / +4 lines)
Lines 28-35 Link Here
28
name=snmpd
28
name=snmpd
29
rcvar=`set_rcvar`
29
rcvar=`set_rcvar`
30
30
31
command=%%PREFIX%%/sbin/snmpd
31
command=%%PREFIX%%/sbin/${name}
32
pidfile='/var/run/snmpd.pid'
32
pidfile=/var/run/${name}.pid
33
sig_stop=-KILL
33
34
34
load_rc_config $name
35
load_rc_config ${name}
35
run_rc_command "$1"
36
run_rc_command "$1"
36
---------==========---------- End of DIFF ----------==========----------

Return to bug 63759