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

fix host search in snmp.cfg

parent bd99efcb
Branches
No related tags found
1 merge request!72fix host search in snmp.cfg
......@@ -35,7 +35,7 @@ read_config(){
SNMPAUTH="-v $SNMPVERSION -c $SNMPCOMMUNITY"
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
SNMPAUTH="$( grep "^DEFAULT:" "$SNMPCONFIG" | cut -f 2- -d ':' )"
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