From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CFA62159C9B for ; Fri, 2 Aug 2024 23:14:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C25F1E2A53; Fri, 2 Aug 2024 23:14:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A68FFE2A53 for ; Fri, 2 Aug 2024 23:14:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EC20934300C for ; Fri, 2 Aug 2024 23:14:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 380C81EA0 for ; Fri, 2 Aug 2024 23:14:12 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1722468970.d6e689bc832e4b033f4af9cb6746a99649ecc8d8.sam@gentoo> Subject: [gentoo-commits] proj/gentoo-functions:master commit in: functions/ X-VCS-Repository: proj/gentoo-functions X-VCS-Files: functions/rc.sh X-VCS-Directories: functions/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: d6e689bc832e4b033f4af9cb6746a99649ecc8d8 X-VCS-Branch: master Date: Fri, 2 Aug 2024 23:14:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b14af1d5-a55e-4259-9afe-954e3b63c72f X-Archives-Hash: 5471cc540868d545ddc6d4957820286d commit: d6e689bc832e4b033f4af9cb6746a99649ecc8d8 Author: Kerin Millar plushkava net> AuthorDate: Wed Jul 31 23:20:10 2024 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jul 31 23:36:10 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=d6e689bc Treat EINFO_LOG as false if equal to RC_SERVICE Consider the value of EINFO_LOG to be false in the event that it is equal to the value of RC_SERVICE. The reason for this is that, as of the time of writing, openrc-run(8) defines and uses EINFO_LOG in a way that is at odds with gentoo-functions. Ideally, the behaviour of OpenRC would be modified so that it becomes possible to jettison this workaround. Fixes: 0dd8364c03c6f8737150ee4f146ddeeec57efee9 Bug: https://bugs.gentoo.org/936613 Signed-off-by: Kerin Millar plushkava.net> functions/rc.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/functions/rc.sh b/functions/rc.sh index 9129b32..9b1fc5d 100644 --- a/functions/rc.sh +++ b/functions/rc.sh @@ -117,7 +117,11 @@ eoutdent() # # Invokes the logger(1) utility, provided that EINFO_LOG is true. The first # parameter shall be taken as a priority level, the second as the message tag, -# and the remaining parameters as the message to be logged. +# and the remaining parameters as the message to be logged. As a special case, +# the value of EINFO_LOG shall be treated as if were false in the event that it +# is equal to the value of RC_SERVICE. The reason for this is that, as of the +# time of writing, openrc-run(8) defines and uses EINFO_LOG in a way that is +# at odds with gentoo-functions. # esyslog() { @@ -126,7 +130,7 @@ esyslog() if [ "$#" -lt 2 ]; then warn "esyslog: too few arguments (got $#, expected at least 2)" return 1 - elif yesno "${EINFO_LOG}" && hash logger 2>/dev/null; then + elif [ "${EINFO_LOG}" != "${RC_SERVICE}" ] && yesno "${EINFO_LOG}"; then pri=$1 tag=$2 shift 2 msg=$*