From defe6d4eeb5533f6bb4d5f50c09b18e545ee61d0 Mon Sep 17 00:00:00 2001 From: Vasilis Tsiligiannis Date: Wed, 1 Jul 2009 19:49:16 +0000 Subject: [PATCH] [packages] net-snmp: Add option 'execname' to allow the usage of same exec names SVN-Revision: 16649 --- libs/net-snmp/files/snmpd.conf | 3 ++- libs/net-snmp/files/snmpd.init | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/net-snmp/files/snmpd.conf b/libs/net-snmp/files/snmpd.conf index fc17504a86..2b3cdf01ed 100644 --- a/libs/net-snmp/files/snmpd.conf +++ b/libs/net-snmp/files/snmpd.conf @@ -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 diff --git a/libs/net-snmp/files/snmpd.init b/libs/net-snmp/files/snmpd.init index 065ffb3c44..ce04902935 100644 --- a/libs/net-snmp/files/snmpd.init +++ b/libs/net-snmp/files/snmpd.init @@ -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 -- 2.30.2