aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/lldpd/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-03-01 12:25:02 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-03-01 12:25:02 +0000
commitc20e46f792b236a94c506b3e27131b6f9d3b774f (patch)
treec545bbe42d372c07fa5a32e5721582eb22d47ad4 /package/network/services/lldpd/files
parent3069934e37334a74eee11b48f82e8d32a4c77b54 (diff)
downloadupstream-c20e46f792b236a94c506b3e27131b6f9d3b774f.tar.gz
upstream-c20e46f792b236a94c506b3e27131b6f9d3b774f.tar.bz2
upstream-c20e46f792b236a94c506b3e27131b6f9d3b774f.zip
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 <jow@openwrt.org> SVN-Revision: 44585
Diffstat (limited to 'package/network/services/lldpd/files')
-rw-r--r--package/network/services/lldpd/files/lldpd.init5
1 files changed, 3 insertions, 2 deletions
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'