Browse Source

SNMPD: Add snmp_extend config option

Signed-off-by: Xavier Franquet <xavier@franquet.es>
lilik-openwrt-22.03
Xavier Franquet 7 years ago
parent
commit
a565ef8eaa
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 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() { snmpd_disk_add() {
local cfg="$1" local cfg="$1"
local disk='disk' local disk='disk'
@ -294,6 +306,7 @@ start_service() {
config_foreach snmpd_access_HostIP_add access_HostIP config_foreach snmpd_access_HostIP_add access_HostIP
config_foreach snmpd_pass_add pass config_foreach snmpd_pass_add pass
config_foreach snmpd_exec_add exec config_foreach snmpd_exec_add exec
config_foreach snmpd_extend_add extend
config_foreach snmpd_disk_add disk config_foreach snmpd_disk_add disk
config_foreach snmpd_engineid_add engineid config_foreach snmpd_engineid_add engineid
append_parm trapcommunity community trapcommunity append_parm trapcommunity community trapcommunity


Loading…
Cancel
Save