systemd inherited package will not be enabled on boot
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 ? Thank you
Kris
Quoted 32 lines · kris duff
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
Quoted 7 lines
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
Quoted 9 lines
Thank you
Kris
Signature · 4 lines
_______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
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 <[email protected]> wrote:
On Apr 9, 2015, at 5:37 AM, kris duff <[email protected]> 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
Signature · 4 lines
_______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto