Wind River Support Network


LIN8-5989 : systemd.bbclass: attempting to use SYSTEMD_AUTO_ENABLE_ causes infinit boot

Created: Mar 9, 2017    Updated: Dec 3, 2018
Resolved Date: Mar 17, 2017
Found In Version:
Fix Version:
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Userspace


If you create a recipe which has a systemd service file (as the one from below added at the my-test.service file) which you want to have enabled by default in the system the system will spin forever attempting to complete the systemd-postinst.

You would think this would happen for only services which define a "After" to create a chicken before egg situation but this happens with even the simplest service files such as

Description=An example service



When booting you will see something like:
[  *** ] A start job is running for Run pending postinsts (7s / no limit)

Steps to Reproduce

1. Create a recipe which include a service file (such as the one in the description) and has systemd variables set.

inherit systemd

do_install() {
  install -d ${D}${sysconfdir}/systemd/system
  install -m 0755 my-test.service ${D}${sysconfdir}/systemd/system

SYSTEMD_SERVICE_${PN} = "my-test.service"

pkg_postinst_${PN}() {
#!/bin/sh -e
if [ x"$D" = "x" ]; then
    # Do something
    echo hanging Hello world at boot
    exit 1

2. Include the package created from this recipe in your image

3. attempt boot the image

Other Downloads

Live chat