net-snmp: moved to github

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@41465 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2014-07-02 12:43:28 +00:00
parent 57f7ce80fb
commit 98272bc749
13 changed files with 0 additions and 13244 deletions

@ -1,262 +0,0 @@
#
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=net-snmp
PKG_VERSION:=5.4.2.1
PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/net-snmp
PKG_MD5SUM:=984932520143f0c8bf7b7ce1fc9e1da1
PKG_FIXUP = patch-libtool
include $(INCLUDE_DIR)/package.mk
define Package/net-snmp/Default
SECTION:=net
CATEGORY:=Network
URL:=http://www.net-snmp.org/
endef
define Package/net-snmp/Default/description
Simple Network Management Protocol (SNMP) is a widely used protocol for
monitoring the health and welfare of network equipment (eg. routers),
computer equipment and even devices like UPSs. Net-SNMP is a suite of
applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both
IPv4 and IPv6.
endef
define Package/libnetsnmp
$(call Package/net-snmp/Default)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libelf1
TITLE:=Open source SNMP implementation (libraries)
endef
define Package/libnetsnmp/description
$(call Package/net-snmp/Default/description)
.
This package contains shared libraries, needed by other programs.
endef
define Package/snmp-utils
$(call Package/net-snmp/Default)
DEPENDS:=+libnetsnmp
TITLE:=Open source SNMP implementation (utilities)
endef
define Package/snmp-utils/description
$(call Package/net-snmp/Default/description)
.
This package contains SNMP client utilities.
endef
define Package/snmpd
$(call Package/net-snmp/Default)
DEPENDS:=+libnetsnmp
TITLE:=Open source SNMP implementation (daemon)
endef
define Package/snmpd/description
$(call Package/net-snmp/Default/description)
.
This package contains the SNMP agent, dynamically linked.
endef
define Package/snmpd-static
$(call Package/net-snmp/Default)
TITLE:=Open source SNMP implementation (daemon)
DEPENDS:=+libelf1
endef
define Package/snmpd-static/description
$(call Package/net-snmp/Default/description)
.
This package contains the SNMP agent, statically linked.
endef
SNMP_MIB_MODULES_INCLUDED = \
host/hr_device \
host/hr_disk \
host/hr_filesys \
host/hr_network \
host/hr_partition \
host/hr_proc \
host/hr_storage \
host/hr_system \
ieee802dot11 \
if-mib/ifXTable \
mibII/at \
mibII/icmp \
mibII/ifTable \
mibII/ip \
mibII/snmp_mib \
mibII/sysORTable \
mibII/system_mib \
mibII/tcp \
mibII/udp \
mibII/vacm_context \
mibII/vacm_vars \
snmpv3/snmpEngine \
snmpv3/snmpMPDStats \
snmpv3/usmConf \
snmpv3/usmStats \
snmpv3/usmUser \
tunnel \
ucd-snmp/disk \
ucd-snmp/dlmod \
ucd-snmp/extensible \
ucd-snmp/loadave \
ucd-snmp/memory \
ucd-snmp/pass \
ucd-snmp/proc \
ucd-snmp/vmstat \
util_funcs \
utilities/execute \
SNMP_MIB_MODULES_EXCLUDED = \
agent_mibs \
agentx \
disman/event \
disman/schedule \
hardware \
host \
if-mib \
mibII \
notification \
notification-log-mib \
snmpv3mibs \
target \
tcp-mib \
ucd_snmp \
udp-mib \
utilities \
SNMP_TRANSPORTS_INCLUDED = Callback UDP
SNMP_TRANSPORTS_EXCLUDED = TCP TCPIPv6 Unix
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-mfd-rewrites \
--enable-shared \
--enable-static \
--with-endianness=$(if $(CONFIG_BIG_ENDIAN),big,little) \
--with-logfile=/var/log/snmpd.log \
--with-persistent-directory=/usr/lib/snmp/ \
--with-default-snmp-version=1 \
--with-sys-contact=root@localhost \
--with-sys-location=Unknown \
--enable-applications \
--disable-debugging \
--disable-manuals \
--disable-mibs \
--disable-scripts \
--with-out-mib-modules="$(SNMP_MIB_MODULES_EXCLUDED)" \
--with-mib-modules="$(SNMP_MIB_MODULES_INCLUDED)" \
--with-out-transports="$(SNMP_TRANSPORTS_EXCLUDED)" \
--with-transports="$(SNMP_TRANSPORTS_INCLUDED)" \
--without-openssl \
--without-libwrap \
--without-rpm \
--without-zlib \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
ifeq ($(CONFIG_IPV6),y)
SNMP_TRANSPORTS_INCLUDED+= UDPIPv6
endif
TARGET_LDFLAGS += -L$(TOOLCHAIN_DIR)/usr/lib
ifdef CONFIG_PACKAGE_snmpd-static
define Build/Compile/static
$(MAKE) -C $(PKG_BUILD_DIR)/agent \
LDFLAGS="$(TARGET_LDFLAGS) -lm -static" \
EXEEXT="-static" \
snmpd-static
endef
endif
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
LDFLAGS="$(TARGET_LDFLAGS) -lm -lc" \
all install
$(Build/Compile/static)
endef
define Build/InstallDev
$(INSTALL_DIR) $(2)/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(2)/bin/
$(SED) 's,=/usr,=$(STAGING_DIR)/usr,g' $(2)/bin/net-snmp-config
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/net-snmp $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} $(1)/usr/lib/
endef
define Package/libnetsnmp/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* $(1)/usr/lib/
endef
define Package/snmpd/conffiles
/etc/default/snmpd
/etc/config/snmpd
endef
define Package/snmpd/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/snmpd.conf $(1)/etc/config/snmpd
$(INSTALL_DIR) $(1)/etc/snmp
ln -sf /var/run/snmpd.conf $(1)/etc/snmp/
$(INSTALL_DIR) $(1)/etc/default
$(INSTALL_DATA) ./files/snmpd.default $(1)/etc/default/snmpd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snmpd $(1)/usr/sbin/snmpd
endef
define Package/snmpd-static/conffiles
/etc/default/snmpd
/etc/config/snmpd
endef
define Package/snmpd-static/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/snmpd.conf $(1)/etc/config/snmpd
$(INSTALL_DIR) $(1)/etc/snmp
ln -sf /var/run/snmpd.conf $(1)/etc/snmp/
$(INSTALL_DIR) $(1)/etc/default
$(INSTALL_DATA) ./files/snmpd.default $(1)/etc/default/snmpd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/agent/snmpd-static $(1)/usr/sbin/snmpd
endef
define Package/snmp-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,trap,walk} $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libnetsnmp))
$(eval $(call BuildPackage,snmp-utils))
$(eval $(call BuildPackage,snmpd))
$(eval $(call BuildPackage,snmpd-static))

@ -1,82 +0,0 @@
config agent
option agentaddress UDP:161
config com2sec public
option secname ro
option source default
option community public
config com2sec private
option secname rw
option source localhost
option community private
config group public_v1
option group public
option version v1
option secname ro
config group public_v2c
option group public
option version v2c
option secname ro
config group public_usm
option group public
option version usm
option secname ro
config group private_v1
option group private
option version v1
option secname rw
config group private_v2c
option group private
option version v2c
option secname rw
config group private_usm
option group private
option version usm
option secname rw
config view all
option viewname all
option type included
option oid .1
config access public_access
option group public
option context none
option version any
option level noauth
option prefix exact
option read all
option write none
option notify none
config access private_access
option group private
option context none
option version any
option level noauth
option prefix exact
option read all
option write all
option notify all
config system
option sysLocation 'office'
option sysContact 'bofh@example.com'
option sysName 'HeartOfGold'
# option sysServices 72
# option sysDescr 'adult playground'
# option sysObjectID '1.2.3.4'
config exec
option name filedescriptors
option prog /bin/cat
option args /proc/sys/fs/file-nr
# option miboid 1.2.3.4

@ -1 +0,0 @@
OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid"

@ -1,146 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2008 OpenWrt.org
START=50
DEFAULT=/etc/default/snmpd
LIB_D=/var/lib/snmp
LOG_D=/var/log
RUN_D=/var/run
PID_F=$RUN_D/snmpd.pid
RUN_C=$RUN_D/snmpd.conf
snmpd_agent_add() {
local cfg="$1"
config_get agentaddress "$cfg" agentaddress
[ -n "$agentaddress" ] || return 0
echo "agentaddress $agentaddress" >> $RUN_C
}
snmpd_system_add() {
local cfg="$1"
config_get syslocation "$cfg" sysLocation
[ -n "$syslocation" ] && echo "sysLocation $syslocation" >> $RUN_C
config_get syscontact "$cfg" sysContact
[ -n "$syscontact" ] && echo "sysContact $syscontact" >> $RUN_C
config_get sysname "$cfg" sysName
[ -n "$sysname" ] && echo "sysName $sysname" >> $RUN_C
config_get sysservice "$cfg" sysService
[ -n "$sysservice" ] && echo "sysService $sysservice" >> $RUN_C
config_get sysdescr "$cfg" sysDescr
[ -n "$sysdescr" ] && echo "sysDescr $sysdescr" >> $RUN_C
config_get sysobjectid "$cfg" sysObjectID
[ -n "$sysobjectid" ] && echo "sysObjectID $sysobjectid" >> $RUN_C
}
snmpd_com2sec_add() {
local cfg="$1"
config_get secname "$cfg" secname
[ -n "$secname" ] || return 0
config_get source "$cfg" source
[ -n "$source" ] || return 0
config_get community "$cfg" community
[ -n "$community" ] || return 0
echo "com2sec $secname $source $community" >> $RUN_C
}
snmpd_com2sec6_add() {
local cfg="$1"
config_get secname "$cfg" secname
[ -n "$secname" ] || return 0
config_get source "$cfg" source
[ -n "$source" ] || return 0
config_get community "$cfg" community
[ -n "$community" ] || return 0
echo "com2sec6 $secname $source $community" >> $RUN_C
}
snmpd_group_add() {
local cfg="$1"
config_get group "$cfg" group
[ -n "$group" ] || return 0
config_get version "$cfg" version
[ -n "$version" ] || return 0
config_get secname "$cfg" secname
[ -n "$secname" ] || return 0
echo "group $group $version $secname" >> $RUN_C
}
snmpd_view_add() {
local cfg="$1"
config_get viewname "$cfg" viewname
[ -n "$viewname" ] || return 0
config_get type "$cfg" type
[ -n "$type" ] || return 0
config_get oid "$cfg" oid
[ -n "$oid" ] || return 0
# optional mask
config_get mask "$cfg" mask
echo "view $viewname $type $oid $mask" >> $RUN_C
}
snmpd_access_add() {
local cfg="$1"
config_get group "$cfg" group
[ -n "$group" ] || return 0
config_get context "$cfg" context
[ -n $context ] || return 0
[ "$context" == "none" ] && context='""'
config_get version "$cfg" version
[ -n "$version" ] || return 0
config_get level "$cfg" level
[ -n "$level" ] || return 0
config_get prefix "$cfg" prefix
[ -n "$prefix" ] || return 0
config_get read "$cfg" read
[ -n "$read" ] || return 0
config_get write "$cfg" write
[ -n "$write" ] || return 0
config_get notify "$cfg" notify
[ -n "$notify" ] || return 0
echo "access $group $context $version $level $prefix $read $write $notify" >> $RUN_C
}
snmpd_pass_add() {
local cfg="$1"
local pass='pass'
config_get miboid "$cfg" miboid
[ -n "$miboid" ] || return 0
config_get prog "$cfg" prog
[ -n "$prog" ] || return 0
config_get_bool persist "$cfg" persist 0
[ $persist -ne 0 ] && pass='pass_persist'
config_get priority "$cfg" priority
priority=${priority:+-p $priority}
echo "$pass $priority $miboid $prog" >> $RUN_C
}
snmpd_exec_add() {
local cfg="$1"
config_get name "$cfg" name
[ -n "$name" ] || return 0
config_get prog "$cfg" prog
[ -n "$prog" ] || return 0
config_get args "$cfg" args
config_get miboid "$cfg" miboid
echo "exec $miboid $name $prog $args" >> $RUN_C
}
start() {
[ -d $LIB_D ] || mkdir -p $LIB_D
[ -d $LOG_D ] || mkdir -p $LOG_D
[ -d $RUN_D ] || mkdir -p $RUN_D
[ -f $RUN_C ] && rm -f $RUN_C
config_load snmpd
config_foreach snmpd_agent_add agent
config_foreach snmpd_system_add system
config_foreach snmpd_com2sec_add com2sec
config_foreach snmpd_com2sec6_add com2sec6
config_foreach snmpd_group_add group
config_foreach snmpd_view_add view
config_foreach snmpd_access_add access
config_foreach snmpd_pass_add pass
config_foreach snmpd_exec_add exec
[ -f $DEFAULT ] && . $DEFAULT
$DEBUG /usr/sbin/snmpd $OPTIONS
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
[ -f $RUN_C ] && rm -f $RUN_C
}

@ -1,22 +0,0 @@
--- a/agent/mibgroup/mibII/interfaces.c
+++ b/agent/mibgroup/mibII/interfaces.c
@@ -1550,6 +1550,10 @@ Interface_Scan_Init(void)
struct ifnet *nnew;
char *stats, *ifstart = line;
+ /* Ignore interfaces with no statistics. */
+ if (strstr(line, "No statistics available."))
+ continue;
+
if (line[strlen(line) - 1] == '\n')
line[strlen(line) - 1] = '\0';
@@ -1583,7 +1587,7 @@ Interface_Scan_Init(void)
&coll) != 5)) {
if ((scan_line_to_use == scan_line_2_2)
&& !strstr(line, "No statistics available"))
- snmp_log(LOG_ERR,
+ snmp_log(LOG_DEBUG,
"/proc/net/dev data format error, line ==|%s|",
line);
continue;

@ -1,40 +0,0 @@
--- a/local/Makefile.in
+++ b/local/Makefile.in
@@ -100,7 +100,7 @@ tkmib.made: $(srcdir)/tkmib
mib2c.made: $(srcdir)/mib2c
if test "x$(PERL)" != "x" ; then \
- $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;' ${srcdir}/mib2c > mib2c.made; \
+ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;s#/usr/local/etc/snmp#$(SNMPCONFPATH)#;' ${srcdir}/mib2c > mib2c.made; \
else \
touch mib2c.made; \
fi
--- a/mibs/Makefile.in
+++ b/mibs/Makefile.in
@@ -48,11 +48,15 @@ NETSNMPMIBS = NET-SNMP-TC.txt NET-SNMP-M
UCDMIBS = UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \
UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt
+EXTRAMIBS = BGP4-MIB.txt BRIDGE-MIB.txt GNOME-SMI.txt OSPF-MIB.txt \
+ OSPF-TRAP-MIB.txt RIPv2-MIB.txt SOURCE-ROUTING-MIB.txt \
+ LM-SENSORS-MIB.txt
+
DEFAULTMIBS = @default_mibs_install@
MIBS = $(V1MIBS) $(V2MIBS) $(V3MIBS) $(RFCMIBS) \
$(AGENTMIBS) $(IANAMIBS) \
- $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS)
+ $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS) $(EXTRAMIBS)
all: standardall
--- a/Makefile.top
+++ b/Makefile.top
@@ -26,6 +26,7 @@ man8dir = $(mandir)/man8
snmplibdir = $(datadir)/snmp
mibdir = $(snmplibdir)/mibs
persistentdir = @PERSISTENT_DIRECTORY@
+sysconfdir = @sysconfdir@
DESTDIR = @INSTALL_PREFIX@
INSTALL_PREFIX = $(DESTDIR)

@ -1,14 +0,0 @@
--- a/local/mib2c
+++ b/local/mib2c
@@ -60,8 +60,9 @@ $currentlevel = -1;
if($ENV{MIB2C_DIR}) {
push @def_search_dirs, split(/:/, $ENV{MIB2C_DIR});
}
-push @def_search_dirs, "/usr/local/share/snmp/";
-push @def_search_dirs, "/usr/local/share/snmp/mib2c-data";
+push @def_search_dirs, "/etc/snmp/";
+push @def_search_dirs, "/usr/share/snmp/";
+push @def_search_dirs, "/usr/share/snmp/mib2c-data";
push @def_search_dirs, "./mib2c-conf.d";
sub usage {

File diff suppressed because it is too large Load Diff

@ -1,95 +0,0 @@
--- a/FAQ
+++ b/FAQ
@@ -99,7 +99,7 @@ TABLE OF CONTENTS
I don't understand the new access control stuff - what does it mean?
How do I configure SNMPv3 users?
The 'createUser' line disappears when I start the agent. Why?
- What's the difference between /var/net-snmp and /usr/local/share/snmp?
+ What's the difference between /var/lib/snmp and /usr/share/snmp?
My new agent is ignoring the old snmpd.conf file. Why?
Why am I getting "Connection refused"?
Why can't I see values in the UCDavis 'extensible' or 'disk' trees?
@@ -643,7 +643,7 @@ How do I add a MIB to the tools?
There are two steps required to add a new MIB file to the tools.
Firstly, copy the MIB file into the appropiate location:
- cp MY-MIB.txt /usr/local/share/snmp/mibs
+ cp MY-MIB.txt /usr/share/snmp/mibs
(which makes it available to everyone on the system)
or
@@ -1177,7 +1177,7 @@ My traphandler script doesn't work when
If this is the case, then you can specify this interpreter
explicitly as part of the trap handle directive:
- traphandle default /usr/bin/perl /usr/local/bin/log_it
+ traphandle default /usr/bin/perl /usr/bin/log_it
In this case, it's almost certain that you'll also
need to give the full path to the traphandle script (as shown)
@@ -1251,7 +1251,7 @@ OK, what should I put in snmp.conf?
string to use.
Some of these (such as the MIB file location), might be best put in
- a shared snmp.conf file (typically /usr/local/share/snmp/snmp.conf or
+ a shared snmp.conf file (typically /usr/share/snmp/snmp.conf or
/etc/snmp/snmp.conf) to apply to all users of the system. Others
(particularly the SNMPv3 security settings), are more likely to refer
to a particular user, and should go in a personal snmp.conf file
@@ -1476,7 +1476,7 @@ Why aren't my mib files being read in?
Alternatively, the tools may be looking in the wrong place.
- The default location for the mib files is /usr/local/share/snmp/mibs.
+ The default location for the mib files is /usr/share/snmp/mibs.
Again, this is set when the suite is first configured and compiled.
This can be changed using the environmental variable 'MIBDIRS'
or the snmp.conf directive 'mibdirs'.
@@ -2430,7 +2430,7 @@ How do I configure SNMPv3 users?
There are three ways to configure SNMPv3 users:
- 1) Stop the agent, and create a file /var/net-snmp/snmpd.conf,
+ 1) Stop the agent, and create a file /var/lib/snmp/snmpd.conf,
containing the line
createUser {myUser} MD5 {myPassword} DES
@@ -2443,7 +2443,7 @@ How do I configure SNMPv3 users?
net-snmp-config --create-snmpv3-user
and follow the instructions. This will create an entry
- in the /var/net-snmp/snmpd.conf file similar to the above.
+ in the /var/lib/snmp/snmpd.conf file similar to the above.
Then re-start the snmpd agent.
3) Make sure the agent is running, and will respond to a suitable
@@ -2476,16 +2476,16 @@ The 'createUser' line disappears when I
-What's the difference between /var/net-snmp and /usr/local/share/snmp?
----------------------------------------------------------------------
+What's the difference between /var/lib/snmp and /usr/share/snmp?
+----------------------------------------------------------------
- The /var/net-snmp location is primarily used for information set
+ The /var/lib/snmp location is primarily used for information set
during the running of the agent, which needs to be persistent between
one run of the agent and the next. Apart from "createUser" (see
the previous entry), you shouldn't need to touch this file.
All other user-provided configuration should go in the traditional
- location (typically /usr/local/share/snmp/snmpd.conf or /etc/snmp).
+ location (typically /usr/share/snmp or /etc/snmp).
@@ -2498,7 +2498,7 @@ My new agent is ignoring the old snmpd.c
distribution), with the current release installed from the source.
The default location for this file with the basic distribution is
- /usr/local/share/snmp/snmpd.conf (or PREFIX/share/snmp/snmpd.conf).
+ /usr/share/snmp/snmpd.conf (or PREFIX/share/snmp/snmpd.conf).
Ready-installed versions often look for the file as /etc/snmpd.conf,
or /etc/snmp/snmpd.conf. Try moving the old config file to the new
location, and restart the agent.

@ -1,142 +0,0 @@
--- a/EXAMPLE.conf.def
+++ b/EXAMPLE.conf.def
@@ -6,7 +6,7 @@
###############################################################################
#
# This file is intended to only be an example. If, however, you want
-# to use it, it should be placed in SYSCONFDIR/snmp/snmpd.conf.
+# to use it, it should be placed in /etc/snmp/snmpd.conf.
# When the snmpd agent starts up, this is where it will look for it.
#
# You might be interested in generating your own snmpd.conf file using
@@ -58,31 +58,37 @@
# from):
# sec.name source community
-com2sec local localhost COMMUNITY
-com2sec mynetwork NETWORK/24 COMMUNITY
+com2sec paranoid default public
+#com2sec readonly default public
+#com2sec readwrite default private
####
# Second, map the security names into group names:
# sec.model sec.name
-group MyRWGroup v1 local
-group MyRWGroup v2c local
-group MyRWGroup usm local
-group MyROGroup v1 mynetwork
-group MyROGroup v2c mynetwork
-group MyROGroup usm mynetwork
+group MyROSystem v1 paranoid
+group MyROSystem v2c paranoid
+group MyROSystem usm paranoid
+group MyROGroup v1 readonly
+group MyROGroup v2c readonly
+group MyROGroup usm readonly
+group MyRWGroup v1 readwrite
+group MyRWGroup v2c readwrite
+group MyRWGroup usm readwrite
####
# Third, create a view for us to let the groups have rights to:
# incl/excl subtree mask
view all included .1 80
+view system included .iso.org.dod.internet.mgmt.mib-2.system
####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:
# context sec.model sec.level match read write notif
+access MyROSystem "" any noauth exact system none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
@@ -100,8 +106,8 @@ access MyRWGroup "" any noaut
# value of an object whose value is given here will fail with an error
# status of notWritable.
-syslocation Right here, right now.
-syscontact Me <me@somewhere.org>
+syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
+syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
# Example output of snmpwalk:
# % snmpwalk -v 1 -c public localhost system
@@ -135,13 +141,13 @@ syscontact Me <me@somewhere.org>
#
# Make sure mountd is running
-proc mountd
+#proc mountd
# Make sure there are no more than 4 ntalkds running, but 0 is ok too.
-proc ntalkd 4
+#proc ntalkd 4
# Make sure at least one sendmail, but less than or equal to 10 are running.
-proc sendmail 10 1
+#proc sendmail 10 1
# A snmpwalk of the prTable would look something like this:
#
@@ -199,7 +205,7 @@ proc sendmail 10 1
# ARGS: optional arguments to be passed to the program
# a simple hello world
-exec echotest /bin/echo hello world
+#exec echotest /bin/echo hello world
# Run a shell script containing:
#
@@ -250,7 +256,7 @@ exec echotest /bin/echo hello world
# Check the / partition and make sure it contains at least 10 megs.
-disk / 10000
+#disk / 10000
# % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.DISKMIBNUM
# enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
@@ -279,7 +285,7 @@ disk / 10000
# 15MAX: Similar, but for 15 min average.
# Check for loads:
-load 12 14 14
+#load 12 14 14
# % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.LOADAVEMIBNUM
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
@@ -365,7 +371,7 @@ load 12 14 14
# (commented out here since it requires that you place the
# script in the right location. (its not installed by default))
-# pass .EXTENSIBLEDOTMIB.255 /bin/sh PREFIX/local/passtest
+# pass .EXTENSIBLEDOTMIB.255 /bin/sh /usr/local/passtest
# % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.255
# enterprises.ucdavis.255.1 = "life the universe and everything"
--- /dev/null
+++ b/EXAMPLE-trap.conf
@@ -0,0 +1,18 @@
+###############################################################################
+#
+# EXAMPLE-trap.conf:
+# An example configuration file for configuring the Net-SNMP snmptrapd agent.
+#
+###############################################################################
+#
+# This file is intended to only be an example. If, however, you want
+# to use it, it should be placed in /etc/snmp/snmptrapd.conf.
+# When the snmptrapd agent starts up, this is where it will look for it.
+#
+# All lines beginning with a '#' are comments and are intended for you
+# to read. All other lines are configuration commands for the agent.
+
+#
+# PLEASE: read the snmptrapd.conf(5) manual page as well!
+#
+

@ -1,12 +0,0 @@
diff -urN net-snmp-5.4.2.1/configure net-snmp-5.4.2.1.new/configure
--- net-snmp-5.4.2.1/configure 2008-10-31 16:53:45.000000000 +0100
+++ net-snmp-5.4.2.1.new/configure 2009-08-02 00:46:05.000000000 +0200
@@ -10218,7 +10218,7 @@
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ finish_cmds=''
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
# This implies no fast_install, which is unacceptable.

@ -1,11 +0,0 @@
--- a/Makefile.top
+++ b/Makefile.top
@@ -81,7 +81,7 @@ LIBCURRENT = 16
LIBAGE = 1
LIBREVISION = 2
-LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
+LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) $(LDFLAGS) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
LIB_EXTENSION = la
LIB_VERSION =
LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(libdir)

File diff suppressed because it is too large Load Diff