Browse Source

Merge pull request #6098 from xavifr/b-snmp-add-extend

snmpd: Add snmp_extend config option

Closes #5764
lilik-openwrt-22.03
Stijn Tintel 7 years ago
committed by GitHub
parent
commit
b157cf4feb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      net/net-snmp/files/snmpd.init

+ 13
- 0
net/net-snmp/files/snmpd.init View File

@ -187,6 +187,18 @@ snmpd_exec_add() {
echo "exec $miboid $name $prog $args" >> $CONFIGFILE
}
snmpd_extend_add() {
local cfg="$1"
config_get name "$cfg" name
[ -n "$name" ] || return 0
config_get prog "$cfg" prog
[ -n "$prog" ] || return 0
config_get args "$cfg" args
config_get miboid "$cfg" miboid
echo "extend $miboid $name $prog $args" >> $CONFIGFILE
}
snmpd_disk_add() {
local cfg="$1"
local disk='disk'
@ -294,6 +306,7 @@ start_service() {
config_foreach snmpd_access_HostIP_add access_HostIP
config_foreach snmpd_pass_add pass
config_foreach snmpd_exec_add exec
config_foreach snmpd_extend_add extend
config_foreach snmpd_disk_add disk
config_foreach snmpd_engineid_add engineid
append_parm trapcommunity community trapcommunity


Loading…
Cancel
Save