Skip to content
Snippets Groups Projects
Commit 40bfce0e authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch '6338-snmpv3' into 'master'

fix host search in snmp.cfg

See merge request !72
parents 54380455 6e2ac234
No related branches found
No related tags found
1 merge request!72fix host search in snmp.cfg
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment