* systemd service not enabled when adding simple recipe to image
@ 2016-03-09 12:21 Sandro Stiller
2016-03-23 14:22 ` Sandro Stiller
0 siblings, 1 reply; 3+ messages in thread
From: Sandro Stiller @ 2016-03-09 12:21 UTC (permalink / raw)
To: openembedded-devel
Hello,
I have a problem enabling a simple systemd service:
If I install my package using the .ipk file, everything works fine
(systemd service ist enabled after install), but if I create an image
containing this package, the service is disabled.
It can be enabled by calling "systemctl enable <mytestscript.service>".
All files of the package are installed correctly (only the systemd
symlink is missing). I have other packages with working systemd, the
problem exists only in the simple case with a single shell script.
I use Angstrom v2015.06 / Yocto 1.8
Can anybody tell me what I'm doing wrong?
Thank you very much,
Sandro
My files:
###################### mytestscript.bb ########################
SUMMARY = "systemd test script"
DESCRIPTION = "This script is a quick demo for a not initialized systemd
service."
SECTION = "console/network"
LICENSE = "MIT"
LIC_FILES_CHKSUM =
"file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
inherit systemd
SRC_URI = "file://mytestscript.service \
file://mytestscript.sh \
"
do_compile() {
}
do_install () {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/mytestscript.sh ${D}${bindir}
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/mytestscript.service
${D}${systemd_unitdir}/system
sed -i -e 's,@BINDIR@,${bindir},g' \
${D}${systemd_unitdir}/system/mytestscript.service
}
NATIVE_SYSTEMD_SUPPORT = "1"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "mytestscript.service"
SYSTEMD_AUTO_ENABLE = "enable"
FILES_${PN} += "${systemd_unitdir}/system/mytestscript.service"
###################### files/mytestscript.sh #########################
#!/bin/sh
echo "Hello from testscript"
###################### files/mytestscript.service ######################
[Unit]
Description=A test script
After=local-fs.target
[Service]
Type=oneshot
ExecStart=@BINDIR@/mytestscript.sh
[Install]
WantedBy=multi-user.target
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: systemd service not enabled when adding simple recipe to image
2016-03-09 12:21 systemd service not enabled when adding simple recipe to image Sandro Stiller
@ 2016-03-23 14:22 ` Sandro Stiller
2016-03-24 4:25 ` Khem Raj
0 siblings, 1 reply; 3+ messages in thread
From: Sandro Stiller @ 2016-03-23 14:22 UTC (permalink / raw)
To: openembedded-devel
If anyone is interested:
The reason why systemd service works if installed using opkg and fails
if I create an image:
The systemctl executable of OE is a shell script which handles the
.service file in a different way.
I had a blank space behind the "WantedBy" line. The "real" systemctl has
no problem with it, but the shell script silently ignores the entry
without any error message and the service is not enabled in the image.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: systemd service not enabled when adding simple recipe to image
2016-03-23 14:22 ` Sandro Stiller
@ 2016-03-24 4:25 ` Khem Raj
0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2016-03-24 4:25 UTC (permalink / raw)
To: openembedded-devel
This is a bug. Can you please create a bug in bugzilla so it can be
addressed
On Mar 23, 2016 7:23 AM, "Sandro Stiller" <sandro.stiller@elfin.de> wrote:
> If anyone is interested:
>
> The reason why systemd service works if installed using opkg and fails if
> I create an image:
>
> The systemctl executable of OE is a shell script which handles the
> .service file in a different way.
> I had a blank space behind the "WantedBy" line. The "real" systemctl has
> no problem with it, but the shell script silently ignores the entry without
> any error message and the service is not enabled in the image.
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-24 4:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-09 12:21 systemd service not enabled when adding simple recipe to image Sandro Stiller
2016-03-23 14:22 ` Sandro Stiller
2016-03-24 4:25 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.