[OE-core] [PATCH 1/1] alsa-state: do not install the init script in case of systemd

Burton, Ross ross.burton at intel.com
Thu Feb 13 12:51:05 UTC 2014


On 13 February 2014 07:32, Chen Qi <Qi.Chen at windriver.com> wrote:
> As the corresponding service files have already been provided by
> the alsa-utils-alsactl package, the init script is really not needed.
> So we do not install it in a systemd based image.

Remember that the presence of the systemd DISTRO_FEATURE doesn't mean
that systemd is actually being used: the distro could have systemd and
sysvinit features, and the choice of init system is decided at image
time.  In this case if a distro was using sysvinit and systemd, your
patch has just deleted the init scripts that are required for sysvinit
boots.

For every situation where there is both a service file and an init
file you must always remember that it's possible that both are to be
installed.  To avoid systemd invoking both the systemd unit and the
sysvinit script on boot it's best to ensure they have the same name
(systemd will then ignore the init script).  If that's not possible
then you can use "systemctl mask" in a postinst to hide the init
script from systemd.  There's plenty of examples for this in oe-core.

Ross



More information about the Openembedded-core mailing list