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

kris duff t_dufff at yahoo.ca
Thu Apr 9 20:50:12 PDT 2015


Khem,
Thank you for your feedback.
Here is the slightly modified service file :
#===========================================
[Unit]
Description=service file
After=network.target

[Service]
User=root

ExecStart=/bin/sh -c 'exec /usr/bin/script.sh'
Restart=always
Type=simple

[Install]
WantedBy=multi-user.target

#==========================================
Regards
Kris 


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

 

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 pleaseYou 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/20150410/b8ef9bd0/attachment.html>


More information about the yocto mailing list