aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/lldpd/files/lldpd.init
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
commit1b4518a6b0bcdcf766cf88dac8e02c7de87e9f62 (patch)
tree3e3aab64a2c6b522d87191fd2e7c4c4d64f1e018 /package/network/services/lldpd/files/lldpd.init
parent6aa75472521111be772ffe67343d41c4be211376 (diff)
downloadmaster-187ad058-1b4518a6b0bcdcf766cf88dac8e02c7de87e9f62.tar.gz
master-187ad058-1b4518a6b0bcdcf766cf88dac8e02c7de87e9f62.tar.bz2
master-187ad058-1b4518a6b0bcdcf766cf88dac8e02c7de87e9f62.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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44585 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/lldpd/files/lldpd.init')
-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'