From: jow Date: Mon, 28 May 2012 15:35:45 +0000 (+0000) Subject: [packages] mini_snmpd: use network.sh to find devices X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=fe362a4df06aedf6c2bf245ec6c986cbb735f00f;p=packages.git [packages] mini_snmpd: use network.sh to find devices git-svn-id: svn://svn.openwrt.org/openwrt/packages@31948 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/net/mini_snmpd/Makefile b/net/mini_snmpd/Makefile index 2dc6a7dd4..b97d2ade6 100644 --- a/net/mini_snmpd/Makefile +++ b/net/mini_snmpd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2011 OpenWrt.org +# Copyright (C) 2009-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mini_snmpd PKG_VERSION:=1.2b -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://members.aon.at/linuxfreak/linux/ diff --git a/net/mini_snmpd/files/mini_snmpd.init b/net/mini_snmpd/files/mini_snmpd.init index 0e48eff5c..20e2c6223 100644 --- a/net/mini_snmpd/files/mini_snmpd.init +++ b/net/mini_snmpd/files/mini_snmpd.init @@ -1,5 +1,5 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2009-2011 OpenWrt.org +# Copyright (C) 2009-2012 OpenWrt.org START=50 @@ -13,9 +13,9 @@ append_disk() { append_interface() { local name="$1" - local interface - config_get interface "$name" 'ifname' "$name" - append interfaces "$interface" ',' + local device + network_get_device device "$name" + append interfaces "${device:-$name}" ',' } append_string() { @@ -54,8 +54,8 @@ start_instance() { } start() { - include /lib/network - scan_interfaces + . /lib/functions/network.sh + config_load 'mini_snmpd' config_foreach start_instance 'mini_snmpd' }