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 74A011581D3 for ; Fri, 17 May 2024 04:03:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6F1B9E2A76; Fri, 17 May 2024 04:03:52 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 4B340E2A76 for ; Fri, 17 May 2024 04:03:52 +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 49938342FFC for ; Fri, 17 May 2024 04:03:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 526911AD5 for ; Fri, 17 May 2024 04:03:48 +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: <1715836276.0dd8364c03c6f8737150ee4f146ddeeec57efee9.sam@gentoo> Subject: [gentoo-commits] proj/gentoo-functions:master commit in: / X-VCS-Repository: proj/gentoo-functions X-VCS-Files: functions.sh X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 0dd8364c03c6f8737150ee4f146ddeeec57efee9 X-VCS-Branch: master Date: Fri, 17 May 2024 04:03:48 +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: 5eb8fbc9-8b17-4170-a323-73e126b6771b X-Archives-Hash: f80ae470f13eadbdead48822acf3799b commit: 0dd8364c03c6f8737150ee4f146ddeeec57efee9 Author: Kerin Millar plushkava net> AuthorDate: Thu May 16 05:11:16 2024 +0000 Commit: Sam James gentoo org> CommitDate: Thu May 16 05:11:16 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=0dd8364c Have esyslog() check that EINFO_LOG is true instead of non-empty It makes no sense for EINFO_LOG to be exceptional. Signed-off-by: Kerin Millar plushkava.net> functions.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/functions.sh b/functions.sh index 050a1d8..bd97f7e 100644 --- a/functions.sh +++ b/functions.sh @@ -122,8 +122,7 @@ eoutdent() } # -# Invokes logger(1) to log the given message, provided that EINFO_LOG is set as -# a non-empty value. +# Invokes logger(1) to log the given message, provided that EINFO_LOG is true. # esyslog() { @@ -132,7 +131,7 @@ esyslog() if [ "$#" -lt 2 ]; then ewarn "Too few arguments for esyslog (got $#, expected at least 2)" return 1 - elif [ -n "${EINFO_LOG}" ] && hash logger 2>/dev/null; then + elif yesno "${EINFO_LOG}" && hash logger 2>/dev/null; then pri=$1 tag=$2 shift 2