From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from moutng.kundenserver.de ([212.227.17.9]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1VN1Gg-0005zt-Mf for ptxdist@pengutronix.de; Fri, 20 Sep 2013 16:02:12 +0200 From: Alexander Dahl Date: Fri, 20 Sep 2013 15:59:33 +0200 Message-Id: <1379685575-11135-7-git-send-email-post@lespocky.de> In-Reply-To: <1379685575-11135-1-git-send-email-post@lespocky.de> References: <1379685575-11135-1-git-send-email-post@lespocky.de> Subject: [ptxdist] [PATCH 6/8] net-snmp: let user choose MIB files to install Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Signed-off-by: Alexander Dahl --- rules/net-snmp.in | 85 +++++++++++++++++++++++++++++++++++++++++++++++++-- rules/net-snmp.make | 80 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 137 insertions(+), 28 deletions(-) diff --git a/rules/net-snmp.in b/rules/net-snmp.in index a36a915..6346711 100644 --- a/rules/net-snmp.in +++ b/rules/net-snmp.in @@ -27,9 +27,90 @@ config NET_SNMP_SCRIPTS bool prompt "scripts (mib2c, ...)" -config NET_SNMP_MIBS +menuconfig NET_SNMP_MIBS bool - prompt "mib files" + prompt "mib files " + +if NET_SNMP_MIBS + +config NET_SNMP_V1MIBS + bool + prompt "v1 MIBS" + default y + help + RFC1155-SMI, RFC1213-MIB, RFC-1215 + +config NET_SNMP_V2MIBS + bool + prompt "v2 MIBS" + default y + help + SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC, SNMPv2-TM, SNMPv2-MIB + +config NET_SNMP_V3MIBS + bool + prompt "v3 MIBS" + default y + help + SNMP-FRAMEWORK-MIB, SNMP-MPD-MIB, SNMP-TARGET-MIB, + SNMP-NOTIFICATION-MIB, SNMP-PROXY-MIB, SNMP-USER-BASED-SM-MIB, + SNMP-VIEW-BASED-ACM-MIB, SNMP-COMMUNITY-MIB, TRANSPORT-ADDRESS-MIB + +config NET_SNMP_AGENTMIBS + bool + prompt "agent MIBS" + default y + help + AGENTX-MIB, SMUX-MIB + +config NET_SNMP_IANAMIBS + bool + prompt "IANA MIBS" + default y + help + IANAifType-MIB, IANA-LANGUAGE-MIB, IANA-ADDRESS-FAMILY-NUMBERS-MIB + +config NET_SNMP_RFCMIBS + bool + prompt "RFC MIBS" + default y + help + IF-MIB, IF-INVERTED-STACK-MIB, EtherLike-MIB, IP-MIB, + IP-FORWARD-MIB, IANA-RTPROTO-MIB, TCP-MIB, UDP-MIB, + INET-ADDRESS-MIB, HCNUM-TC, HOST-RESOURCES-MIB, + HOST-RESOURCES-TYPES, RMON-MIB, IPV6-TC, IPV6-MIB, IPV6-ICMP-MIB, + IPV6-TCP-MIB, IPV6-UDP-MIB, DISMAN-EVENT-MIB, DISMAN-SCRIPT-MIB, + DISMAN-SCHEDULE-MIB, NOTIFICATION-LOG-MIB, SNMP-USM-AES-MIB, + SNMP-USM-DH-OBJECTS-MIB + +config NET_SNMP_NETSNMPMIBS + bool + prompt "Net-SNMP MIBS" + default y + help + NET-SNMP-TC, NET-SNMP-MIB, NET-SNMP-AGENT-MIB, + NET-SNMP-EXAMPLES-MIB, NET-SNMP-EXTEND-MIB, NET-SNMP-PASS-MIB + +config NET_SNMP_UCDMIBS + bool + prompt "UCD MIBS" + default y + help + UCD-SNMP-MIB, UCD-DEMO-MIB, UCD-IPFWACC-MIB, UCD-DLMOD-MIB, + UCD-DISKIO-MIB + +config NET_SNMP_LMSENSORS_MIB + bool "lm-sensors MIBS" if NET_SNMP_MIB_MODULES_LM_SENSORS + help + LM-SENSORS-MIB + +config NET_SNMP_OTHERMIBS + bool + prompt "other MIBS" + help + BRIDGE-MIB, IPV6-FLOW-LABEL-MIB, SCTP-MIB, TUNNEL-MIB + +endif config NET_SNMP_MIB_LOADING bool diff --git a/rules/net-snmp.make b/rules/net-snmp.make index e0415e8..c0cc786 100644 --- a/rules/net-snmp.make +++ b/rules/net-snmp.make @@ -2,6 +2,7 @@ # # Copyright (C) 2006 by Randall Loomis # 2010 Michael Olbrich +# 2013 Alexander Dahl # # See CREDITS for details about who has contributed to this project. # @@ -165,44 +166,73 @@ NET_SNMP_MAKE_PAR := NO # Target-Install # ---------------------------------------------------------------------------- +NET_SNMP_MIBS := -NET_SNMP_V1MIBS := RFC1155-SMI.txt RFC1213-MIB.txt RFC-1215.txt +ifdef PTXCONF_NET_SNMP_MIBS + +ifdef PTXCONF_NET_SNMP_V1MIBS +NET_SNMP_MIBS += RFC1155-SMI.txt RFC1213-MIB.txt RFC-1215.txt +endif -NET_SNMP_V2MIBS := SNMPv2-CONF.txt SNMPv2-SMI.txt SNMPv2-TC.txt SNMPv2-TM.txt SNMPv2-MIB.txt +ifdef PTXCONF_NET_SNMP_V2MIBS +NET_SNMP_MIBS += SNMPv2-CONF.txt SNMPv2-SMI.txt SNMPv2-TC.txt \ + SNMPv2-TM.txt SNMPv2-MIB.txt +endif -NET_SNMP_V3MIBS := SNMP-FRAMEWORK-MIB.txt SNMP-MPD-MIB.txt SNMP-TARGET-MIB.txt \ - SNMP-NOTIFICATION-MIB.txt SNMP-PROXY-MIB.txt \ - SNMP-USER-BASED-SM-MIB.txt SNMP-VIEW-BASED-ACM-MIB.txt \ +ifdef PTXCONF_NET_SNMP_V3MIBS +NET_SNMP_MIBS += SNMP-FRAMEWORK-MIB.txt SNMP-MPD-MIB.txt \ + SNMP-TARGET-MIB.txt SNMP-NOTIFICATION-MIB.txt \ + SNMP-PROXY-MIB.txt SNMP-USER-BASED-SM-MIB.txt \ + SNMP-VIEW-BASED-ACM-MIB.txt \ SNMP-COMMUNITY-MIB.txt TRANSPORT-ADDRESS-MIB.txt +endif -NET_SNMP_AGENTMIBS := AGENTX-MIB.txt SMUX-MIB.txt +ifdef PTXCONF_NET_SNMP_AGENTMIBS +NET_SNMP_MIBS += AGENTX-MIB.txt SMUX-MIB.txt +endif -NET_SNMP_IANAMIBS := IANAifType-MIB.txt IANA-LANGUAGE-MIB.txt \ +ifdef PTXCONF_NET_SNMP_IANAMIBS +NET_SNMP_MIBS += IANAifType-MIB.txt IANA-LANGUAGE-MIB.txt \ IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt +endif -NET_SNMP_RFCMIBS := IF-MIB.txt IF-INVERTED-STACK-MIB.txt \ - EtherLike-MIB.txt \ - IP-MIB.txt IP-FORWARD-MIB.txt IANA-RTPROTO-MIB.txt \ - TCP-MIB.txt UDP-MIB.txt \ - INET-ADDRESS-MIB.txt HCNUM-TC.txt \ - HOST-RESOURCES-MIB.txt HOST-RESOURCES-TYPES.txt \ - RMON-MIB.txt \ - IPV6-TC.txt IPV6-MIB.txt IPV6-ICMP-MIB.txt IPV6-TCP-MIB.txt \ - IPV6-UDP-MIB.txt \ - DISMAN-EVENT-MIB.txt DISMAN-SCRIPT-MIB.txt DISMAN-SCHEDULE-MIB.txt \ +ifdef PTXCONF_NET_SNMP_RFCMIBS +NET_SNMP_MIBS += IF-MIB.txt IF-INVERTED-STACK-MIB.txt \ + EtherLike-MIB.txt IP-MIB.txt \ + IP-FORWARD-MIB.txt IANA-RTPROTO-MIB.txt \ + TCP-MIB.txt UDP-MIB.txt INET-ADDRESS-MIB.txt \ + HCNUM-TC.txt HOST-RESOURCES-MIB.txt \ + HOST-RESOURCES-TYPES.txt RMON-MIB.txt \ + IPV6-TC.txt IPV6-MIB.txt IPV6-ICMP-MIB.txt \ + IPV6-TCP-MIB.txt IPV6-UDP-MIB.txt \ + DISMAN-EVENT-MIB.txt DISMAN-SCRIPT-MIB.txt \ + DISMAN-SCHEDULE-MIB.txt \ NOTIFICATION-LOG-MIB.txt SNMP-USM-AES-MIB.txt \ SNMP-USM-DH-OBJECTS-MIB.txt +endif -NET_SNMP_NETSNMPMIBS := NET-SNMP-TC.txt NET-SNMP-MIB.txt NET-SNMP-AGENT-MIB.txt \ - NET-SNMP-EXAMPLES-MIB.txt NET-SNMP-EXTEND-MIB.txt \ - NET-SNMP-PASS-MIB.txt +ifdef PTXCONF_NET_SNMP_NETSNMPMIBS +NET_SNMP_MIBS += NET-SNMP-TC.txt NET-SNMP-MIB.txt \ + NET-SNMP-AGENT-MIB.txt \ + NET-SNMP-EXAMPLES-MIB.txt \ + NET-SNMP-EXTEND-MIB.txt NET-SNMP-PASS-MIB.txt +endif -NET_SNMP_UCDMIBS := UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \ +ifdef PTXCONF_NET_SNMP_UCDMIBS +NET_SNMP_MIBS += UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \ UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt +endif + +ifdef PTXCONF_NET_SNMP_LMSENSORS_MIB +NET_SNMP_MIBS += LM-SENSORS-MIB.txt +endif -## FIXME: for now, you need to manually edit this list to represent what mibs to install on target. -NET_SNMP_MIBS := $(NET_SNMP_V1MIBS) $(NET_SNMP_V2MIBS) $(NET_SNMP_V3MIBS) \ - $(NET_SNMP_AGENTMIBS) $(NET_SNMP_IANAMIBS) $(NET_SNMP_RFCMIBS) $(NET_SNMP_NETSNMPMIBS) $(NET_SNMP_UCDMIBS) +ifdef PTXCONF_NET_SNMP_OTHERMIBS +NET_SNMP_MIBS += BRIDGE-MIB.txt IPV6-FLOW-LABEL-MIB.txt SCTP-MIB.txt \ + TUNNEL-MIB.txt +endif + +endif $(STATEDIR)/net-snmp.targetinstall: @$(call targetinfo) @@ -263,9 +293,7 @@ endif # snmplib @$(call install_lib, net-snmp, 0, 0, 0644, libnetsnmp) -# MIB files ifdef PTXCONF_NET_SNMP_MIBS - @for i in $(NET_SNMP_MIBS); do \ $(call install_copy, net-snmp, 0, 0, 0644, -, \ $(call remove_quotes,$(PTXCONF_NET_SNMP_MIB_INSTALL_DIR))/$$i, n) ; \ -- 1.7.10.4 -- ptxdist mailing list ptxdist@pengutronix.de