From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1594912-garchives=archives.gentoo.org@lists.gentoo.org> 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 96C1715838C for <garchives@archives.gentoo.org>; Sat, 27 Jan 2024 08:50:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB7C9E29C6; Sat, 27 Jan 2024 08:50:10 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BEC95E29C6 for <gentoo-commits@lists.gentoo.org>; Sat, 27 Jan 2024 08:50:10 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BCA603433B7 for <gentoo-commits@lists.gentoo.org>; Sat, 27 Jan 2024 08:50:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2EE8F1065 for <gentoo-commits@lists.gentoo.org>; Sat, 27 Jan 2024 08:50:08 +0000 (UTC) From: "Joonas Niilola" <juippis@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" <juippis@gentoo.org> Message-ID: <1706345335.8cbc788fa83b225e7fd72f38b248a50a1e21e616.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron X-VCS-Directories: mail-filter/spamassassin/files/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: 8cbc788fa83b225e7fd72f38b248a50a1e21e616 X-VCS-Branch: master Date: Sat, 27 Jan 2024 08:50:08 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e3930105-cdf3-4965-b124-1f4e0e9d2750 X-Archives-Hash: 38bc54249cac11119ce47ed8e45c0421 commit: 8cbc788fa83b225e7fd72f38b248a50a1e21e616 Author: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com> AuthorDate: Fri Nov 24 18:19:30 2023 +0000 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> CommitDate: Sat Jan 27 08:48:55 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cbc788f mail-filter/spamassassin: Fix script output when amavisd is disabled Because bash scripts exit with the status of the last command. If systemctl is installed but amavisd is not active the script returns with the value 4. This causes cron to send an email. Switching from "&&" to an if fixes this. Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift.com> Closes: https://bugs.gentoo.org/681872 Closes: https://github.com/gentoo/gentoo/pull/33969 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron b/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron index edac381b5de4..37c04f5b6ad8 100644 --- a/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron +++ b/mail-filter/spamassassin/files/update-spamassassin-rules-r1.cron @@ -35,7 +35,8 @@ if (( $? == 0 || $? == 3 )); then # check is to keep systemctl from outputting warnings if # amavisd is not installed (bug #681872). systemctl try-restart spamassassin - systemctl is-active --quiet amavisd \ - && systemctl try-reload-or-restart amavisd + if ( systemctl is-active --quiet amavisd ); then + systemctl try-reload-or-restart amavisd + fi fi fi