From patchwork Tue Apr 2 13:02:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Donald X-Patchwork-Id: 1918787 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=y5KO2HJD; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=lGrfebRG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V87PJ6D1vz1yYB for ; Wed, 3 Apr 2024 00:04:04 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FLTzdpY1n8HtTg9UZCX/MtvxZIyvr174FN02ilzuFw4=; b=y5KO2HJD/sb6Ql EH6FJYY1i/hKqjSjRMaLoVKsYFuwwi+7adiyFd7AZjGlKwTXRjqIaKBDl9DUyH2KzMn10cyL9FFiP +c8kY6FPoGQWUAAKsQ48y/W0ofCrckB0CaqBuKrawe82rdTC/24+u7DXXO19O2JXCx995Q4mZVwm4 muUZ91tWtiqdxEQFeLjNQHo/PvACgjeDZU0wdFrQYPWSuu4QD4+hJs1fHsJTdpFLsDyDtVSxxaA8h mSmDRMznyFyeedPX1ai6s36eYYYiKBO8unT/T9gxnj+cUbE7MOhZalhQr6DiADBW4Hv2LuDUUplb1 M2/oyucYa8rXU0isAtsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrdmv-0000000BDZH-44j5; Tue, 02 Apr 2024 13:02:53 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrdmb-0000000BDQ6-0EEf for openwrt-devel@lists.openwrt.org; Tue, 02 Apr 2024 13:02:35 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-516afb04ec7so1562191e87.2 for ; Tue, 02 Apr 2024 06:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712062944; x=1712667744; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=svbBmpUnwB9Q5MUXctX7SMY6TVb1QTXJwF5tC5caJJs=; b=lGrfebRGXSt6NLxLpT1N5iC0EqSgBMG7rgF8GHkmHgR1i543dPGOpW1qiVtOrySVIf 9qVh6XPzYJ1TvJkE70K32QpQWBx46SWiVRdTY61AQS1pAoAJV2doEYuL2LZ89hZr1Py3 +T7nMpxsXJQ1XW2cT+wzY1z+i/hOuyE5Cdp8TRXXw8IECd6iNb/9XPd//EMxBmZcasvT vSePHMiTn/8ORXsOGR4jyrhqSslSX3/SX6silGG+xQOSH4Wmprlkcto+WpjOvKQurTDf DFwmt9r+uOLLR7yX2eAf/9zDr2hE81RCB9IUlOSJs2fZLUkj9hxWpRFUdw2vgW7YLq2S K0gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712062944; x=1712667744; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=svbBmpUnwB9Q5MUXctX7SMY6TVb1QTXJwF5tC5caJJs=; b=qm18F3XDxXkZdK9piEydRUCISGCTJZIC5fgsl0prIYMaLzDG74nrLjLVuKE9yGSbWO mYvo3dwxHJ0UfAo3q4J1aA+kajwKInvOtrJXBealUCOpfjHykghyXjnDy2IP3qM5gWkE P50KRV+LQrshEtLrd0oLIiP0lfkfA2nSqOUEQUvFWx/cssGlvv6zt09RZ3rc0bu7nbu+ hGhCLgk0G9VoKWHzq+sRRkupYsdjAmZQnnsTd3gYui+KBgGt1IRSz1DPrfVJGlkFBDwN 52FWv6JGsvDLk5Dgnh9esCLWRv2Aip7Pap7snV0oI7094UY0pjGISbaQeNLEsXCX9TZJ d54Q== X-Gm-Message-State: AOJu0YzCV9XpkUrZR/0cnPy5Z7mJaa1njFgqROkW/6z3KmRbwj7fFUcE Yj0hDg5jpaxU00bn2+F+BSvhfYcFDDdIow8Si1y6uYzlRk30Xpg+Mpc1k9Ky X-Google-Smtp-Source: AGHT+IFl2QMrtZJvJAFifcNERLuetXBEuKxqse2zWvrcpp0NinLcrIdmv1oC32Ixz76FL9iKXTjlLQ== X-Received: by 2002:ac2:5f59:0:b0:513:cbf2:50b2 with SMTP id 25-20020ac25f59000000b00513cbf250b2mr7865148lfz.13.1712062943982; Tue, 02 Apr 2024 06:02:23 -0700 (PDT) Received: from blackhol3 ([2001:9b0:40::cae3:cb03]) by smtp.gmail.com with ESMTPSA id d8-20020ac241c8000000b00515fc468f45sm995071lfi.31.2024.04.02.06.02.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 06:02:22 -0700 (PDT) From: Paul Donald To: openwrt-devel@lists.openwrt.org Subject: [PATCH 3/7] lldpd: fix restart Date: Tue, 2 Apr 2024 15:02:17 +0200 Message-ID: <20240402130221.58706-3-newtwen+github@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240402130221.58706-1-newtwen+github@gmail.com> References: <20240402130221.58706-1-newtwen+github@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240402_060233_239315_ACE6A9FF X-CRM114-Status: GOOD ( 10.70 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: redirection broke in 5364fe0f01ca11b47c55d78f756d3176748dd0c2 redirects to /dev/null shall be handled correctly (i.e. last). This fixes these errors on `/etc/init.d/lldpd reload`: Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:131 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [newtwen+github(at)gmail.com] X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org redirection broke in 5364fe0f01ca11b47c55d78f756d3176748dd0c2 redirects to /dev/null shall be handled correctly (i.e. last). This fixes these errors on `/etc/init.d/lldpd reload`: 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` Tested on: 22.03.6 Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 069c8fee80..0334156fee 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -363,7 +363,7 @@ reload_service() { return 0 fi - $LLDPCLI -u "$LLDPSOCKET" 2>&1 /dev/null <<-EOF + $LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF pause unconfigure lldp custom-tlv unconfigure system interface pattern @@ -373,7 +373,7 @@ reload_service() { unconfigure system platform EOF if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then - $LLDPCLI -u "$LLDPSOCKET" 2>&1 /dev/null <<-EOF + $LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF unconfigure med fast-start EOF @@ -381,9 +381,9 @@ reload_service() { # Rewrite lldpd.conf # If something changed it should be included by the lldpcli call write_lldpd_conf - $LLDPCLI -u "$LLDPSOCKET" -c "$LLDPD_CONF" -c "$LLDPD_CONFS_DIR" 2>&1 /dev/null + $LLDPCLI -u "$LLDPSOCKET" -c "$LLDPD_CONF" -c "$LLDPD_CONFS_DIR" >/dev/null 2>&1 # Broadcast update over the wire - $LLDPCLI -u "$LLDPSOCKET" 2>&1 /dev/null <<-EOF + $LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF resume update EOF @@ -391,6 +391,6 @@ reload_service() { } stop_service() { - rm -rf ${LLDPD_RUN} "$LLDPSOCKET" 2> /dev/null + rm -rf ${LLDPD_RUN} "$LLDPSOCKET" >/dev/null 2>&1 }