diff options
Diffstat (limited to 'package/net-snmp')
-rw-r--r-- | package/net-snmp/Config.in | 52 | ||||
-rw-r--r-- | package/net-snmp/Makefile | 117 | ||||
-rw-r--r-- | package/net-snmp/files/snmpd.conf | 14 | ||||
-rw-r--r-- | package/net-snmp/files/snmpd.default | 1 | ||||
-rw-r--r-- | package/net-snmp/files/snmpd.init | 27 | ||||
-rw-r--r-- | package/net-snmp/ipkg/libnetsnmp.control | 4 | ||||
-rw-r--r-- | package/net-snmp/ipkg/snmp-utils.control | 5 | ||||
-rw-r--r-- | package/net-snmp/ipkg/snmpd.conffiles | 1 | ||||
-rw-r--r-- | package/net-snmp/ipkg/snmpd.control | 5 | ||||
-rw-r--r-- | package/net-snmp/ipkg/snmpd.postinst | 3 |
10 files changed, 229 insertions, 0 deletions
diff --git a/package/net-snmp/Config.in b/package/net-snmp/Config.in new file mode 100644 index 000000000..08c28f508 --- /dev/null +++ b/package/net-snmp/Config.in @@ -0,0 +1,52 @@ +config ADK_COMPILE_NET_SNMP + bool + default n + +config ADK_PACKAGE_LIBNETSNMP + prompt "net-snmp-libs..................... SNMP shared libraries" + tristate + default n + select ADK_COMPILE_NET_SNMP + select ADK_PACKAGE_LIBELF + help + 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. + + http://www.net-snmp.org/ + + This package contains shared libraries, needed by other programs. + +config ADK_PACKAGE_SNMP_UTILS + prompt "net-snmp-utils.................... SNMP client utilities" + tristate + default n + select ADK_PACKAGE_LIBNETSNMP + help + 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. + + http://www.net-snmp.org/ + + This package contains the SNMP client utilities. + +config ADK_PACKAGE_SNMPD + prompt "net-snmp-daemon................... SNMP agent" + tristate + default n + select ADK_PACKAGE_LIBNETSNMP + help + 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. + + http://www.net-snmp.org/ + + This package contains the SNMP agent, dynamically linked. diff --git a/package/net-snmp/Makefile b/package/net-snmp/Makefile new file mode 100644 index 000000000..03ba15519 --- /dev/null +++ b/package/net-snmp/Makefile @@ -0,0 +1,117 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= net-snmp +PKG_VERSION:= 5.4.2.1 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 984932520143f0c8bf7b7ce1fc9e1da1 +MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=net-snmp/} + +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 \ + mibII/at \ + mibII/icmp \ + 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/usmStats \ + snmpv3/usmUser \ + snmpv3mibs \ + 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 = \ + mibII/interfaces \ + if-mib \ + agent_mibs \ + agentx \ + host \ + ieee802dot11 \ + mibII \ + notification \ + notification-log-mib \ + notification/snmpNotifyTable \ + target \ + ucd_snmp \ + utilities \ + +SNMP_TRANSPORTS_INCLUDED= Callback UDP + +SNMP_TRANSPORTS_EXCLUDED= TCP TCPv6 UDPv6 Unix + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,LIBNETSNMP,libnetsnmp,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,SNMPD,snmpd,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) +$(eval $(call PKG_template,SNMP_UTILS,snmp-utils,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE:= gnu +CONFIGURE_ENV+= ac_cv_header_pcap_h=no +CONFIGURE_ARGS+= --with-endianness=little \ + --with-logfile=/var/log/snmpd.log \ + --with-persistent-directory=/usr/lib/snmp/ \ + --with-default-snmp-version=3 \ + --with-sys-contact=root@localhost \ + --with-sys-location=Unknown \ + --enable-applications \ + --disable-debugging \ + --disable-manuals \ + --disable-mib-loading \ + --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-opaque-special-types \ + --without-openssl \ + --without-libwrap \ + --without-rpm \ + --without-zlib +ifneq ($(ADK_IPV6),y) +CONFIGURE_ARGS+= --disable-ipv6 +endif +BUILD_STYLE:= auto +INSTALL_STYLE:= confprog auto +FAKE_FLAGS+= INSTALL_PREFIX="${WRKINST}" + +post-install: + ${INSTALL_DIR} ${IDIR_LIBNETSNMP}/usr/lib + ${CP} ${WRKINST}/usr/lib/libnetsnmp.so* ${IDIR_LIBNETSNMP}/usr/lib/ + ${INSTALL_DIR} ${IDIR_SNMPD}/etc/snmp + ${INSTALL_DIR} ${IDIR_SNMPD}/etc/init.d + ${INSTALL_DIR} ${IDIR_SNMPD}/usr/sbin + ${INSTALL_DATA} ./files/snmpd.conf ${IDIR_SNMPD}/etc/snmp/snmpd.conf + ${INSTALL_BIN} ./files/snmpd.init ${IDIR_SNMPD}/etc/init.d/snmpd + ${INSTALL_BIN} ${WRKINST}/usr/sbin/snmpd ${IDIR_SNMPD}/usr/sbin/snmpd + ${INSTALL_DIR} ${IDIR_SNMP_UTILS}/usr/bin + ${CP} ${WRKINST}/usr/bin/snmp{get,set,status,test,trap,walk} ${IDIR_SNMP_UTILS}/usr/bin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/net-snmp/files/snmpd.conf b/package/net-snmp/files/snmpd.conf new file mode 100644 index 000000000..f6e872ab6 --- /dev/null +++ b/package/net-snmp/files/snmpd.conf @@ -0,0 +1,14 @@ +com2sec ro default public +com2sec rw localhost private + +group public v1 ro +group public v2c ro +group public usm ro +group private v1 rw +group private v2c rw +group private usm rw + +view all included .1 + +access public "" any noauth exact all none none +access private "" any noauth exact all all all diff --git a/package/net-snmp/files/snmpd.default b/package/net-snmp/files/snmpd.default new file mode 100644 index 000000000..758c8e44f --- /dev/null +++ b/package/net-snmp/files/snmpd.default @@ -0,0 +1 @@ +OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid" diff --git a/package/net-snmp/files/snmpd.init b/package/net-snmp/files/snmpd.init new file mode 100644 index 000000000..71cf6c597 --- /dev/null +++ b/package/net-snmp/files/snmpd.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + [[ $snmpd_flags = NO ]] && exit 0 + exec sh $0 start + ;; +start) + [ -d /var/lib/snmp ] || mkdir -p /var/lib/snmp + snmpd $snmpd_flags + ;; +stop) + killall snmpd + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/net-snmp/ipkg/libnetsnmp.control b/package/net-snmp/ipkg/libnetsnmp.control new file mode 100644 index 000000000..7a28ef887 --- /dev/null +++ b/package/net-snmp/ipkg/libnetsnmp.control @@ -0,0 +1,4 @@ +Package: libnetsnmp +Priority: optional +Section: libs +Description: SNMP shared libraries diff --git a/package/net-snmp/ipkg/snmp-utils.control b/package/net-snmp/ipkg/snmp-utils.control new file mode 100644 index 000000000..42d9251c8 --- /dev/null +++ b/package/net-snmp/ipkg/snmp-utils.control @@ -0,0 +1,5 @@ +Package: snmp-utils +Priority: optional +Section: admin +Description: SNMP client utilities +Depends: libnetsnmp, libelf diff --git a/package/net-snmp/ipkg/snmpd.conffiles b/package/net-snmp/ipkg/snmpd.conffiles new file mode 100644 index 000000000..121a94479 --- /dev/null +++ b/package/net-snmp/ipkg/snmpd.conffiles @@ -0,0 +1 @@ +/etc/snmp/snmpd.conf diff --git a/package/net-snmp/ipkg/snmpd.control b/package/net-snmp/ipkg/snmpd.control new file mode 100644 index 000000000..986b19631 --- /dev/null +++ b/package/net-snmp/ipkg/snmpd.control @@ -0,0 +1,5 @@ +Package: snmpd +Priority: optional +Section: admin +Description: SNMP agent +Depends: libnetsnmp, libelf diff --git a/package/net-snmp/ipkg/snmpd.postinst b/package/net-snmp/ipkg/snmpd.postinst new file mode 100644 index 000000000..3f053bd5d --- /dev/null +++ b/package/net-snmp/ipkg/snmpd.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf 'e.g. "-Lf /dev/null -p /var/run/snmpd.pid"' snmpd_flags |