Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: systemd + run-postinsts.service
Date: Mon, 23 Mar 2015 22:57:14 +0100	[thread overview]
Message-ID: <1427147834.3412.89.camel@intel.com> (raw)

Hello!

I'm using systemd from OE-core master to boot core-image-minimal. I'm
seeing a boot failure where "Run pending postinsts" (aka
run-postinsts.service) gets stuck during booting under very specific
circumstances:

     1. The package has a pkg_postinst_${PN} which (intentionally)
        failed during image building, thus delaying its execution to the
        first boot.
     2. The package uses "inherit systemd" to enable its own systemd
        service.

It seems to be "systemctl start <service name>" which is hanging,
because I can reproduce the same behavior without systemd.bbclass in the
following pkg_postinst:

pkg_postinst_${PN} () {
#!/bin/sh -e
   # Cannot run during image building...
   if [ x"$D" != "x" ]; then
      exit 1
   fi

   # Do something on target during first boot.

   systemctl enable foobar
   systemctl start foobar # <====
}

It works without the last line. The actual recipe is a bit more complex,
but I can try to create a dummy one if that would help.

Any idea what could be causing this and, more importantly, how to fix
it?





             reply	other threads:[~2015-03-23 21:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 21:57 Patrick Ohly [this message]
2015-03-23 22:33 ` systemd + run-postinsts.service Jonathan Liu
2015-03-24  7:59   ` Patrick Ohly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427147834.3412.89.camel@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox