From patchwork Sun May 8 12:09:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo-Andres Hofmann X-Patchwork-Id: 5597 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Kx36552Cpz3xqn for ; Sun, 8 May 2022 12:10:21 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Kx35y0k1Dz5l9; Sun, 8 May 2022 12:10:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Kx35y0Mp9z2yfm; Sun, 8 May 2022 12:10:14 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Kx35x2VNjz2x9j for ; Sun, 8 May 2022 12:10:13 +0000 (UTC) Received: from arche.uberspace.de (arche.uberspace.de [185.26.156.147]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4Kx35p4hrSz5VR for ; Sun, 8 May 2022 12:10:06 +0000 (UTC) Received: (qmail 30370 invoked by uid 990); 8 May 2022 12:10:05 -0000 From: Leo-Andres Hofmann To: development@lists.ipfire.org Subject: [PATCH 6/7] pakfire.cgi: Discard tac stderr output Date: Sun, 8 May 2022 14:09:51 +0200 Message-Id: <20220508120952.52-6-hofmann@leo-andres.de> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20220508120952.52-1-hofmann@leo-andres.de> References: <20220508120952.52-1-hofmann@leo-andres.de> MIME-Version: 1.0 X-Rspamd-Bar: - X-Rspamd-Report: R_MISSING_CHARSET(0.5) MIME_GOOD(-0.1) MID_CONTAINS_FROM(1) BAYES_HAM(-2.999999) X-Rspamd-Score: -1.599999 Received: from unknown (HELO unkown) (::1) by arche.uberspace.de (Haraka/2.8.28) with ESMTPSA; Sun, 08 May 2022 14:10:05 +0200 ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1652011806; a=rsa-sha256; cv=none; b=RRfWVVM5Jact6aJgdE8thEFyCKcVjDn9pfeIxzvJI7EauYiqlkNvnWQsH1S7a/jm3ynpIa 1cCkUlQBP5xfmaK1WvllXE5B19ehBlkH4hzqnaangzoJ14OWDxaoYkZhO5AniOA0uf7M9g 4u5lkQJmqZPZSOREumqnF7O3H6Cba+/xTiOEzzjUpqjASGNZJJZCfuvN12/HSuib9L/kh8 xTvEoYpBRXXD13/Gk5o3LXHCQQSeRdXro2JuKhv+xwYyy9Hg+1bciqxz2LWAvqv90GjBJs pkeZlcivyOqnASl6f0MLccAeKvUaIW2XyITza0Tur8Fi0NEcVvOVemb5os4g1w== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=none; spf=pass (mail01.ipfire.org: domain of hofmann@leo-andres.de designates 185.26.156.147 as permitted sender) smtp.mailfrom=hofmann@leo-andres.de; dmarc=pass (policy=quarantine) header.from=leo-andres.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1652011806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cUAXnsp0WCV5dtMEIWJ7+R6IG18AXO/AHg7YAGyO4Hw=; b=E7teHDjMbaAY41mTaSg/0yaa8soF07r7ZZw3VTQllr8YNKr+zgmPR6WwssiK9RMlm3G+KW h2agRBuki5SrGli/gybXfcKEPYj3/+/bBG2ENYw0amoa1U5bal9Rs4mDi1iYbH4UKy1p/v IVvZNlpd1fLBNLYWxonKoAWkdFkaT7H+OXC7/7RK/bCWPtyC8znxPilP0wcxdi/iB43y+R ht6xKHwMIjAXjTE+sNk7Gzt7Nc6Bdlu7dSQsrwXOMpua6f8Occf4YXbYMWDesjmlzNkP9x 2Ujw+9MByuoGcRs3gVrTd5vGgcn5AGbmU/YzIvBdhpkCoOnEJx0FhZztSuvIaQ== X-Rspamd-Queue-Id: 4Kx35p4hrSz5VR X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-3.58 / 11.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-1.000]; SPF_REPUTATION_HAM(-0.77)[-0.77342682734463]; DMARC_POLICY_ALLOW(-0.50)[leo-andres.de,quarantine]; R_MISSING_CHARSET(0.50)[]; MX_INVALID(0.50)[]; R_SPF_ALLOW(-0.20)[+mx:c]; MIME_GOOD(-0.10)[text/plain]; IP_REPUTATION_HAM(-0.01)[asn: 205766(0.00), country: DE(-0.01), ip: 185.26.156.147(0.00)]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:205766, ipnet:185.26.156.0/24, country:DE]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[185.26.156.147:from]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; ARC_NA(0.00)[] Authentication-Results: mail01.ipfire.org; dkim=none; spf=pass (mail01.ipfire.org: domain of hofmann@leo-andres.de designates 185.26.156.147 as permitted sender) smtp.mailfrom=hofmann@leo-andres.de; dmarc=pass (policy=quarantine) header.from=leo-andres.de X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Prevents meaningless "broken pipe" messages in the httpd error log. Signed-off-by: Leo-Andres Hofmann Acked-by: Peter Müller --- html/cgi-bin/pakfire.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 6fade81bd..489b07a6d 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -75,7 +75,7 @@ if($cgiparams{'ACTION'} eq 'json-getstatus') { # Read /var/log/messages backwards until a "Pakfire started" header is found, # to capture all messages of the last (i.e. current) Pakfire run - my @messages = `tac /var/log/messages | sed -n '/pakfire:/{p;/Pakfire.*started/q}'`; + my @messages = `tac /var/log/messages 2>/dev/null | sed -n '/pakfire:/{p;/Pakfire.*started/q}'`; # Test if the log contains an error message (fastest implementation, stops at first match) my $failure = any{ index($_, 'ERROR') != -1 } @messages;