Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id C890BE00954; Thu, 9 Apr 2015 20:50:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (t_dufff[at]yahoo.ca) * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [98.137.177.227 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from nm17-vm3.bullet.mail.gq1.yahoo.com (nm17-vm3.bullet.mail.gq1.yahoo.com [98.137.177.227]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 69BC3E008F6 for ; Thu, 9 Apr 2015 20:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1428637828; bh=uzko/pUUqBBxU+aLLsUDfYpCi5xnxa2UHBHozQiQHbM=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=IVkJW+kL8U7L64ftjMphsW2aKnjSDHEVYzpid6WzWhdYbuPO5pT5gPvd1ShccxJpulIm7DaprHqzXCgWKAtuec+/Ak8oyfVIL07dfxqvX/Iv4VAyxqYDdE0Hs7MxXCh5YcJxbeqgCZQAuLcHxSLSCZmvp/6Pb+jOozkD+jPBodngPBarLEgsjy59V0sY+5Lsl6DCy/5yX/kqX8RLNl1PyLsV3uxYRkXBl87CzAvCLPIixOJln602iv1UBNBtisVRbxWslgiP2wJ+PZC3e8nqFRsdMnQivRcsQ6lCuspSpKN6bGWhWe5BVeXpHzVl+zqDo3hitkS7G6bZHVA7p5UqkA== Received: from [98.137.12.190] by nm17.bullet.mail.gq1.yahoo.com with NNFMP; 10 Apr 2015 03:50:28 -0000 Received: from [98.137.12.241] by tm11.bullet.mail.gq1.yahoo.com with NNFMP; 10 Apr 2015 03:50:28 -0000 Received: from [127.0.0.1] by omp1049.mail.gq1.yahoo.com with NNFMP; 10 Apr 2015 03:50:28 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 355595.38703.bm@omp1049.mail.gq1.yahoo.com X-YMail-OSG: Uwdb_f4VM1kkHvor_IzlDGplAQ46qCOBuFXVNVGT5ndcAS8J4_M6F4MP.eoawTO gsZGHBqlqhcG.SZmxfAFhDIL1oO1QlLqy6Q1yqvOMmagRqVy7ZP1WCr7xEuWBlWhL2_f.jI7ctMX IHYDpW5MG8zeUJ7wn8p_7.OdAuNGG0xBC_pSlXWpRgBh0tWDqFVTVw_8FQ.6seu3ero9XH4K2FK8 ta7xDHCoEpKDyYcY4IO67.4dBgXfNafNSF0THVf2Dqy_B6xNtlVALLKHB2.Yu2_y1uicrHlaU.Hf Y9vGGSPlMVOazYfvu5aIn9pHUXLGx0wgIEzxWj67QVwutR6lMSezhkBv_ApvnNALSabTrc67qkwd TqD5xvq3kgz_ApIS41brqo9fk7K3095IfPjOcgNPUgTxGJMUNe.B.om8lieVICbIkE6Lt91IADBF 0hluVp4HNc1lJwKbyvGmZzekraRMKbc3wRYssgCB3FWwVK9JeR9VMtBJSPRH3857cE.tMg1lSo5a Kt8w- Received: by 216.39.60.209; Fri, 10 Apr 2015 03:50:27 +0000 Date: Fri, 10 Apr 2015 03:50:12 +0000 (UTC) From: kris duff To: Khem Raj Message-ID: <2086273110.22881.1428637812534.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <830F98AF-CD39-408A-918A-21EEFA353391@gmail.com> References: <830F98AF-CD39-408A-918A-21EEFA353391@gmail.com> MIME-Version: 1.0 Cc: "yocto@yoctoproject.org" Subject: Re: systemd inherited package will not be enabled on boot X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: kris duff List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 03:50:35 -0000 Content-Type: multipart/alternative; boundary="----=_Part_22880_1902815845.1428637812525" ------=_Part_22880_1902815845.1428637812525 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Khem, Thank you for your feedback. Here is the slightly modified service file : #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [Unit] Description=3Dservice file After=3Dnetwork.target [Service] User=3Droot ExecStart=3D/bin/sh -c 'exec /usr/bin/script.sh' Restart=3Dalways Type=3Dsimple [Install] WantedBy=3Dmulti-user.target #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Regards Kris=20 On Thursday, April 9, 2015 8:24 PM, Khem Raj wrot= e: =20 =20 On Apr 9, 2015, at 5:37 AM, kris duff wrote: Hello, using yocto dizzy ( but had the same problem with daisy ) I have a strange problem with few recipes that inherit from systemd.bbclass= . When I add the package to an image recipe, the software will NOT be started= on boot. But, if I install the package from RPM, it will be started automa= tically on boot. I use a .bbappend template to add systemd service file to the package. The template looks like this : #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D inherit systemd SRC_URI +=3D "file://filiname.service" =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=20 FILES_${PN} +=3D "/lib/" SYSTEMD_SERVICE_${PN} =3D "filename.service" do_install_append() { =C2=A0=C2=A0=C2=A0 install -d ${D}${systemd_unitdir}/system =C2=A0=C2=A0=C2=A0 install -m 0644 ${WORKDIR}/filename.service ${D}${system= d_unitdir}/system } #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D I tried to add SYSTEMD_PACKAGE =3D ${PN}-systemd no luck I tried to add SYSTEMD_AUTO_ENABLE =3D "enable" will not help neither. Do somebody have an advice to help me debug this ? show you .service file too pleaseYou need to have [install] section inside = your unit file. I think you are missing that Thank you Kris --=20 _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto ------=_Part_22880_1902815845.1428637812525 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Khe= m,

Thank you for yo= ur feedback.

Here is the slightly modified service file :

#=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=

[Unit]
Description=3Dservice file
After=3Dnetwork.target

[Service]
User=3Droot

ExecStart=3D/bin/sh -c 'exec /us= r/bin/script.sh'
Restart=3Dalways
Type=3Dsimple

[= Install]
WantedBy=3Dmulti-user.target

#=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Regards

Kri= s



On Thursday, April 9, 2015 8:24 PM,= Khem Raj <raj.khem@gmail.com> wrote:



On Apr 9, 2015, at 5:37 AM, kris duf= f <t_dufff@yahoo.ca> wrote:

Hello,

using yocto dizzy ( but had the same problem with daisy )

I have a strange pro= blem with few recipes that inherit from systemd.bbclass.

Whe= n I add the package to an image recipe, the software will NOT be started on= boot. But, if I install the package from RPM, it will be started automatic= ally on boot.

I u= se a .bbappend template to add systemd service file to the package.

The template looks like this :

#=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D
in= herit systemd

SRC_URI +=3D "file://filiname.servi= ce"
  &n= bsp;           
FILES_${PN} +=3D "/lib/"

SYSTEMD_SERVICE_${PN} =3D "filename.service"

do_install_append() {
    install -d ${D}${systemd_un= itdir}/system
 &n= bsp;  install -m 0644 ${WORKDIR}/filename.service ${D}${systemd_unitdi= r}/system
}
#=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=
I tried to add SYSTEMD_PACKAGE =3D ${PN}-systemd

no luck

I tried to a= dd SYSTEMD_AUTO_ENABLE =3D "enable"
will not help neither.

Do somebo= dy have an advice to help me debug this ?

show you .ser= vice file too please
You need to have [install] section inside yo= ur unit file. I think you are missing that


Thank you

Kris

--
_= ______________________________________________
yocto mailing list
= yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto




------=_Part_22880_1902815845.1428637812525--