From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by mail.openembedded.org (Postfix) with ESMTP id 691E66D548 for ; Tue, 18 Jun 2019 09:48:09 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 45Sjtx4mkNz1rbM7; Tue, 18 Jun 2019 11:48:09 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 45Sjtx4NcBz1qqkk; Tue, 18 Jun 2019 11:48:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 0eacV21z0MA5; Tue, 18 Jun 2019 11:48:06 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Tue, 18 Jun 2019 11:48:06 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id C9090454045E; Tue, 18 Jun 2019 11:47:59 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 1N-Otps7Iuas; Tue, 18 Jun 2019 11:47:51 +0200 (CEST) Received: from [192.168.178.132] (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id 0C72645402A6; Tue, 18 Jun 2019 11:47:49 +0200 (CEST) To: Khem Raj , Stefano Babic References: <20190531085447.827-1-sbabic@denx.de> From: Stefano Babic Openpgp: preference=signencrypt Autocrypt: addr=sbabic@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e7u1EVln6iV3ilBvbbfkyRssk4/0e kicpSnQknA72YOMAAwYH+QGpAiQ4hAMHrp1bUrtyGXYdeQpYufIZAM4etOnBy/G+e1nfu6y+ jH4SN9sVK7bwBBAbhEJqkqR5LVsFIRapThJQOWB11rQxLpwkBU9wao/pRM+o95ujGo32WUzf wWrzWrkTDy7vMCZuUOLVi4n1GZlUAwpG4rzb6UxPC6GWymkVWGgXp1NC58og5i3Y+rKT7+Xi XT2BtvC6PDepoH4JhD+9OkHQO6UfTxPSmtgNbTgtl6L6tj+bm5dOHgkPJFMkEiG8qhUZYQzb bYz37orRbA72M2bxK76e9QKn0mVu+d/YCd8wRcvvJbGsozpzcxPvD5Wy5RNJCES8McPtAseU tMfCSQQYEQIACQUCR90HmAIbDAAKCRD09WXkmmjvpv+3AJ9RakBsH1j0X/Kxp6t2lf0VUfS2 qACfZ+J6ktk8PKNuyHf0J/I0mbCrhV4= Message-ID: <9e82e2e5-dffa-49dd-cb9d-a8f3587f8f89@denx.de> Date: Tue, 18 Jun 2019 11:47:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Cc: openembeded-devel Subject: Re: [PATCH] systat: systemd never enables the service X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2019 09:48:10 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit On 17/06/19 07:44, Khem Raj wrote: > this is wrong ml for this package, please send this to oe-core ml. Ouch...thanks Khem, I will repost. Stefano > > On Fri, May 31, 2019 at 2:04 AM Stefano Babic wrote: >> >> Even if SYSTEMD_AUTO_ENABLE is set to "enable", the service is never >> activated by systemd. The cause is the postinst function in the recipe: >> >> pkg_postinst_${PN} () { >> if [ -n "$D" ]; then >> exit 0 >> fi >> if [ -e /etc/init.d/populate-volatile.sh ]; then >> /etc/init.d/populate-volatile.sh update >> fi >> } >> >> This generates with activated systemd the following postinst script: >> >> set -e >> if [ -n "$D" ]; then >> exit 0 >> fi >> if [ -e /etc/init.d/populate-volatile.sh ]; then >> /etc/init.d/populate-volatile.sh update >> fi >> OPTS="" >> >> if [ -n "$D" ]; then >> OPTS="--root=$D" >> fi >> >> if type systemctl >/dev/null 2>/dev/null; then >> if [ -z "$D" ]; then >> systemctl daemon-reload >> fi >> >> systemctl $OPTS enable sysstat.service >> >> if [ -z "$D" -a "enable" = "enable" ]; then >> systemctl --no-block restart sysstat.service >> fi >> fi >> >> Due to the exit statement, systemctl is never called and the service is >> never enabled in rootfs. >> Invert the logic for the check to let run the rest of postinst script. >> >> Signed-off-by: Stefano Babic >> --- >> meta/recipes-extended/sysstat/sysstat.inc | 11 +++++------ >> 1 file changed, 5 insertions(+), 6 deletions(-) >> >> diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc >> index 0bc7e14d36..850a6d1465 100644 >> --- a/meta/recipes-extended/sysstat/sysstat.inc >> +++ b/meta/recipes-extended/sysstat/sysstat.inc >> @@ -51,12 +51,11 @@ do_install() { >> } >> >> pkg_postinst_${PN} () { >> - if [ -n "$D" ]; then >> - exit 0 >> - fi >> - if [ -e /etc/init.d/populate-volatile.sh ]; then >> - /etc/init.d/populate-volatile.sh update >> - fi >> + if [ ! -n "$D" ]; then >> + if [ -e /etc/init.d/populate-volatile.sh ]; then >> + /etc/init.d/populate-volatile.sh update >> + fi >> + fi >> } >> >> >> -- >> 2.17.1 >> >> -- >> _______________________________________________ >> Openembedded-devel mailing list >> Openembedded-devel@lists.openembedded.org >> http://lists.openembedded.org/mailman/listinfo/openembedded-devel -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de =====================================================================