From: Jo-Philipp Wich Date: Sun, 1 Mar 2015 12:25:02 +0000 (+0000) Subject: lldpd: fix passing multiple ifnames to the daemon X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=77fd4dae1c57e57b4e167ce14b17d40e936788b9;p=openwrt%2Fsvn-archive%2Farchive.git lldpd: fix passing multiple ifnames to the daemon Instead of multiple -I arguments, lldpd expects a comma separated list. Signed-off-by: Jo-Philipp Wich SVN-Revision: 44585 --- diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index 88982d1a86..5a1921e9d0 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lldpd PKG_VERSION:=0.7.13 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index b2eea70fd3..2b1b223663 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -37,14 +37,15 @@ start() { local ifaces config_get ifaces 'config' 'interface' - local iface + local iface ifnames="" for iface in $ifaces; do local ifname="" if network_get_device ifname "$iface" || [ -e "/sys/class/net/$iface" ]; then - append args "-I ${ifname:-$iface}" + append ifnames "${ifname:-$iface}" "," fi done + [ -n "$ifnames" ] && append args "-I $ifnames" [ $enable_cdp -gt 0 ] && append args '-c' [ $enable_fdp -gt 0 ] && append args '-f' [ $enable_sonmp -gt 0 ] && append args '-s'