SNMP frontend. New snmp_lib.[ch] and rearranged code into lib
Test: renamed WITH_SNMP -> ENABLE_SNMP
This commit is contained in:
parent
1f8b82e8e1
commit
62a32faf9c
9 changed files with 349 additions and 214 deletions
|
|
@ -53,7 +53,7 @@ HAVE_HTTP1=@HAVE_HTTP1@
|
|||
WITH_LIBXML2=@with_libxml2@
|
||||
|
||||
# Check if we have support for Net-SNMP enabled or not.
|
||||
WITH_NETSNMP=@enable_netsnmp@
|
||||
ENABLE_NETSNMP=@enable_netsnmp@
|
||||
|
||||
# C++ compiler
|
||||
CXX=@CXX@
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ fi
|
|||
: ${SNMPCHECK:=true}
|
||||
|
||||
if $SNMPCHECK; then
|
||||
if [ "${WITH_NETSNMP}" == "yes" ]; then
|
||||
if [ "${ENABLE_NETSNMP}" == "yes" ]; then
|
||||
pgrep snmpd > /dev/null
|
||||
if [ $? != 0 ]; then
|
||||
echo -e "\e[31m\nenable-netsnmp set but snmpd not running, start with:"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
|||
|
||||
APPNAME=example
|
||||
|
||||
if [ ${WITH_NETSNMP} != "yes" ]; then
|
||||
if [ ${ENABLE_NETSNMP} != "yes" ]; then
|
||||
echo "Skipping test, Net-SNMP support not enabled."
|
||||
if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
|||
APPNAME=snmp
|
||||
|
||||
# XXX skip for now
|
||||
if [ ${WITH_NETSNMP} != "yes" ]; then
|
||||
if [ ${ENABLE_NETSNMP} != "yes" ]; then
|
||||
echo "Skipping test, Net-SNMP support not enabled."
|
||||
if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
|||
|
||||
APPNAME=snmp
|
||||
|
||||
if [ ${WITH_NETSNMP} != "yes" ]; then
|
||||
if [ ${ENABLE_NETSNMP} != "yes" ]; then
|
||||
echo "Skipping test, Net-SNMP support not enabled."
|
||||
if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue