How to iherit class based on a conditional variable? #sysvinit #systemd


Bel Hadj Salem Talel <bhstalel@...>
 

Hello,

I have a recipe that installs a simple bash script to run on startup.
As you all know, there is systemd and sysvinit.
I need to add support for both init managers.

I can do :
SRC_URI_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://script.service', 'file://script.sh', d)}"

and I can do the same in all the tasks.

The problem is, that I need to inherit either systemd or update-rc.d

Is it possible to inherit them all, or how can I inherit something conditionally ?

Thanks,
Talel

Join yocto@lists.yoctoproject.org to automatically receive all group messages.