Skip to content
Snippets Groups Projects

fix host search in snmp.cfg

Merged Hahn Axel (hahn) requested to merge 6338-snmpv3 into master
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -35,7 +35,7 @@ read_config(){
@@ -35,7 +35,7 @@ read_config(){
SNMPAUTH="-v $SNMPVERSION -c $SNMPCOMMUNITY"
SNMPAUTH="-v $SNMPVERSION -c $SNMPCOMMUNITY"
if [ -r "$SNMPCONFIG" ]; then
if [ -r "$SNMPCONFIG" ]; then
SNMPAUTH="$( grep -v "^#" "$SNMPCONFIG" | grep "^,*${SNMPTARGET}[,:]" | cut -f 2- -d ':' )"
SNMPAUTH="$( grep -v "^#" "$SNMPCONFIG" | grep ",*${SNMPTARGET}[,:]" | cut -f 2- -d ':' )"
if [ -z "$SNMPAUTH" ]; then
if [ -z "$SNMPAUTH" ]; then
SNMPAUTH="$( grep "^DEFAULT:" "$SNMPCONFIG" | cut -f 2- -d ':' )"
SNMPAUTH="$( grep "^DEFAULT:" "$SNMPCONFIG" | cut -f 2- -d ':' )"
if [ -z "$SNMPAUTH" ]; then
if [ -z "$SNMPAUTH" ]; then
Loading