lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

commit 2d56e60686786e18bb6304aaeb3e339d2b8d3210
parent a10f2201d6bbae7cf67693450968c9267b1b8b96
Author: Jo-Philipp Wich <jow@openwrt.org>
Date:   Sun, 26 Oct 2014 15:40:12 +0100

Merge pull request #422 from rcmcronny/patch-1

Update snmpd.init - add support for disk config option
Diffstat:
Mnet/net-snmp/files/snmpd.init | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/net/net-snmp/files/snmpd.init b/net/net-snmp/files/snmpd.init @@ -119,6 +119,16 @@ snmpd_exec_add() { config_get miboid "$cfg" miboid echo "exec $miboid $name $prog $args" >> $RUN_C } +snmpd_disk_add() { + local cfg="$1" + local disk='disk' + + config_get partition "$cfg" partition + [ -n "$partition" ] || return 0 + config_get size "$cfg" size + [ -n "$size" ] || return 0 + echo "$disk $partition $size" >> $RUN_C +} start() { [ -d $LIB_D ] || mkdir -p $LIB_D [ -d $LOG_D ] || mkdir -p $LOG_D @@ -136,7 +146,8 @@ start() { config_foreach snmpd_access_add access config_foreach snmpd_pass_add pass config_foreach snmpd_exec_add exec - + config_foreach snmpd_disk_add disk + [ -f $DEFAULT ] && . $DEFAULT $DEBUG /usr/sbin/snmpd $OPTIONS }