[packages] net-snmp: Add option 'execname' to allow the usage of same exec names

git-svn-id: svn://svn.openwrt.org/openwrt/packages@16649 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
acinonyx 2009-07-01 19:49:16 +00:00
parent 68419fd0d4
commit b1b35822b1
2 changed files with 5 additions and 2 deletions

View File

@ -71,7 +71,8 @@ config system
option sysDescr 'adult playground'
# option sysObjectID '1.2.3.4'
config exec filedescriptors
config exec
option name filedescriptors
option prog /bin/cat
option args /proc/sys/fs/file-nr
# option miboid 1.2.3.4

View File

@ -94,11 +94,13 @@ snmpd_pass_add() {
snmpd_exec_add() {
local cfg="$1"
config_get execname "$cfg" execname
[ -n "$execname" ] || return 0
config_get prog "$cfg" prog
[ -n "$prog" ] || return 0
config_get args "$cfg" args
config_get miboid "$cfg" miboid
echo "exec $miboid $cfg $prog $args" >> $RUN_C
echo "exec $miboid $execname $prog $args" >> $RUN_C
}
start() {
[ -d $LIB_D ] || mkdir -p $LIB_D