All of lore.kernel.org
 help / color / mirror / Atom feed
From: Koen Kooi <koen@dominion.thruhere.net>
To: openembedded-devel@lists.openembedded.org
Subject: Systemd sysv compat mode, was: Re: guidelines for upstart in oe?
Date: Mon, 19 Sep 2011 11:12:33 +0200	[thread overview]
Message-ID: <j57121$rkg$1@dough.gmane.org> (raw)
In-Reply-To: <20110919080621.GB3783@chargestorm.se>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 19-09-11 10:06, Anders Darander schreef:
> * Steffen Sledz <sledz@dresearch-fe.de> [110916 18:15]:
>> I'm not sure if there exist upstart based oe distros/images. But it 
>> seems that there are some systemd based ones 
>> (recipes/images/angstrom-systemd-image.bb).
> 
>> Do they have a similar problem? How do these handle the sysvinit config
>> vs. systemd config for the different services?
> 
> It varies slightly.
> 
> Some packages, e.g. dropbear, has an extra package dropbear-systemd in 
> meta-oe, that packages the systemd unit files for dropbear. The same is 
> true for dbus in oe-core.
> 
> Other packages, like ofono in oe-core, pacakages the systemd unit files 
> directly in the ofono-package.
> 
> In all these cases, sysvinit files are supplied directly in the main 
> package.

This works for systemd since it has a working sysv compat mode and override
mechanism. Consider the following scenarios:

a) native mode
/lib/systemd/system/foo.service

native systemd unit will get used

b) dual mode
/etc/init.d/foo
/lib/systemd/system/foo.service

native systemd unit will get used, sysv script gets ignored.

c) sysv mode
/lib/systemd/system/foo.service

sysv script will run

d) masking
/etc/init.d/foo
/lib/systemd/system/foo.service is a symlink to /dev/null

sysv script will not run

So in the systemd world we can control which system gets used quite well.
And coming from an OE world writing systemd units is easy since they are
conceptually the same as recipes (e.g. DEPENDS -> Requires:) and don't
require a ton of boilerplate.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFOdweBMkyGM64RGpERAuuAAKCzWKuX6zVciC6VGoFv/udJlAgEmQCfRwx9
JDOJJKugRiyamOx+S9RJthg=
=bEGV
-----END PGP SIGNATURE-----




  parent reply	other threads:[~2011-09-19  9:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-14 15:31 guidelines for upstart in oe? Steffen Sledz
2011-09-16 15:29 ` Steffen Sledz
2011-09-16 15:32   ` Phil Blundell
2011-09-16 16:15     ` Steffen Sledz
2011-09-16 20:33       ` Steffen Sledz
2011-09-19  8:06       ` Anders Darander
2011-09-19  9:11         ` Steffen Sledz
2011-09-19  9:12         ` Koen Kooi [this message]
2011-09-17  6:24     ` Steffen Sledz
2011-09-19  8:34       ` Phil Blundell
2011-09-16 15:35   ` Koen Kooi

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='j57121$rkg$1@dough.gmane.org' \
    --to=koen@dominion.thruhere.net \
    --cc=openembedded-devel@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 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.