From patchwork Fri Feb 27 20:41:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 444496 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AE27B140146 for ; Sat, 28 Feb 2015 07:42:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=0RohAtsf; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 93E2728C6AE; Fri, 27 Feb 2015 21:41:55 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 17F7C28C69E for ; Fri, 27 Feb 2015 21:41:49 +0100 (CET) X-policyd-weight: using cached result; rate:hard: -8.5 Received: from mail-we0-f174.google.com (mail-we0-f174.google.com [74.125.82.174]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Fri, 27 Feb 2015 21:41:49 +0100 (CET) Received: by wesw55 with SMTP id w55so22606896wes.4 for ; Fri, 27 Feb 2015 12:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MQKUGpH0VDbggtQQc2tKLAY+4VitJJakb++voAIZxz0=; b=0RohAtsfJO62Pusrn5a6Xr4B9W0PwTS94g0cHH2a9HwPQF7jd3DF9LHX9iqRQWZMqN j2+zoXWN/nY9tThImobl138x2dvfFM2mm6TxZoGesJ/ZVWJQjNzN8l5g5vA93bwcdcvX 8/zhABjRcYXITdkrAo3l9w5rw4BvhDrt/VaI4/kUeCZUDqeGCIucLOQpV4LeB5InpfAS T6Pjs/WQwcfw6lSknzW6KI+rixC7I7q9nCLZJcEwlCcorYPbPkS5R/IAqvM4UJbQCPNd JxVv1N9eHb+mz2IrR6vTscfEBPCc7x7vBM/T4+KqVOryNteryIAyqeIl17mm9TiSqZR1 vJNg== X-Received: by 10.194.192.167 with SMTP id hh7mr31988024wjc.151.1425069720276; Fri, 27 Feb 2015 12:42:00 -0800 (PST) Received: from linux-kkns.site ([188.24.71.42]) by mx.google.com with ESMTPSA id u18sm7450745wjq.42.2015.02.27.12.41.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 12:41:59 -0800 (PST) From: Alexandru Ardelean To: openwrt-devel@lists.openwrt.org Date: Fri, 27 Feb 2015 22:41:24 +0200 Message-Id: <1425069684-21711-1-git-send-email-ardeleanalex@gmail.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1425054196-18340-1-git-send-email-ardeleanalex@gmail.com> References: <1425054196-18340-1-git-send-email-ardeleanalex@gmail.com> Subject: [OpenWrt-Devel] [PATCH][RESEND] lldpd: fix init script for multiple interfaces X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" The lldpd daemon requires only 1 -I parameter with all interfaces joined with commas. So, it needs: /usr/sbin/lldpd -I lan1,lan2,...,lanX versus /usr/sbin/lldpd -I lan1 -I lan2 ... -I lanX The latter seems to take into consideration only lanX, while other devices are ignored by lldpd. Signed-off-by: Alexandru Ardelean --- package/network/services/lldpd/files/lldpd.init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index b2eea70..bbb5c74 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -41,9 +41,10 @@ start() { 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 args "${ifname:-$iface}" fi done + [ -n "$args" ] && args="-I `echo $args | tr ' ' ','`" [ $enable_cdp -gt 0 ] && append args '-c' [ $enable_fdp -gt 0 ] && append args '-f'