Imported Upstream version 2.7.3
This commit is contained in:
parent
a356b56d11
commit
fd413a3168
283 changed files with 14978 additions and 6511 deletions
|
|
@ -67,11 +67,14 @@ TMP_STRWALKFILE=`mktemp "$TMPDIR/$NAME-TMP-STRWALK.XXXXXX"`
|
|||
|
||||
get_snmp_data() {
|
||||
# 1) get the sysOID (points the mfr specif MIB)
|
||||
SYSOID=`snmpget -v1 -c $COMMUNITY $HOSTNAME .1.3.6.1.2.1.1.2.0 41`
|
||||
SYSOID=`snmpget -v1 -c $COMMUNITY -Ov $HOSTNAME .1.3.6.1.2.1.1.2.0 | cut -d' ' -f2`
|
||||
|
||||
echo "sysOID retrieved: ${SYSOID}"
|
||||
|
||||
# 2) get the content of the mfr specif MIB
|
||||
echo "Retrieving SNMP information. This may take some time"
|
||||
snmpwalk -On -v1 -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_NUMWALKFILE
|
||||
snmpwalk -Os -v1 -M $MIBS_DIRLIST -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_STRWALKFILE
|
||||
snmpwalk -Os -v1 -m ALL -M $MIBS_DIRLIST -c $COMMUNITY $HOSTNAME $SYSOID 2>/dev/null 1> $DFL_STRWALKFILE
|
||||
}
|
||||
|
||||
# process command line options
|
||||
|
|
@ -80,7 +83,7 @@ while [ $# -gt 0 ]; do
|
|||
DRIVER="$2"
|
||||
shift 2
|
||||
elif [ $# -gt 1 -a "$1" = "-M" ]; then
|
||||
MIBS_DIRLIST="$MIBS_DIRLIST:$2"
|
||||
MIBS_DIRLIST="+$2"
|
||||
shift 2
|
||||
elif [ "$1" = "-k" ]; then
|
||||
KEEP=yes
|
||||
|
|
@ -340,8 +343,8 @@ Done.
|
|||
Do not forget to:
|
||||
* bump DRIVER_VERSION in snmp-ups.c (add "0.01")
|
||||
* copy "${HFILE}" and "${CFILE}" to "../../drivers"
|
||||
* add #include "${HFILE}" to snmp-ups.c
|
||||
* add &${LDRIVER} to snmp-ups.c:mib2nut[] list,
|
||||
* add #include "${HFILE}" to drivers/snmp-ups.c
|
||||
* add &${LDRIVER} to drivers/snmp-ups.c:mib2nut[] list,
|
||||
* add ${LDRIVER}-mib.c to snmp_ups_SOURCES in drivers/Makefile.am
|
||||
* add ${LDRIVER}-mib.h to dist_noinst_HEADERS in drivers/Makefile.am
|
||||
* "./autogen.sh && ./configure && make" from the top level directory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue