[yocto] systemd inherited package will not be enabled on boot

Khem Raj raj.khem at gmail.com
Thu Apr 9 17:24:58 PDT 2015


> On Apr 9, 2015, at 5:37 AM, kris duff <t_dufff at yahoo.ca> 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 automatically on boot.
> 
> I use a .bbappend template to add systemd service file to the package.
> 
> The template looks like this :
> 
> #==========================================================
> inherit systemd
> 
> SRC_URI += "file://filiname.service"
>                
> FILES_${PN} += "/lib/"
> 
> SYSTEMD_SERVICE_${PN} = "filename.service"
> 
> do_install_append() {
>     install -d ${D}${systemd_unitdir}/system
>     install -m 0644 ${WORKDIR}/filename.service ${D}${systemd_unitdir}/system
> }
> #==========================================================
> 
> I tried to add SYSTEMD_PACKAGE = ${PN}-systemd
> 
> no luck
> 
> I tried to add SYSTEMD_AUTO_ENABLE = "enable"
> 
> will not help neither.
> 
> Do somebody have an advice to help me debug this ?

show you .service file too please
You need to have [install] section inside your unit file. I think you are missing that

> 
> Thank you
> 
> Kris
> -- 
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20150409/1987cb03/attachment.html>


More information about the yocto mailing list