[yocto] enable/disable systemd from image.bb

Katu Txakur katutxakurra at gmail.com
Tue Mar 11 00:37:04 PDT 2014


Sorry, I meant

ROOTFS_POSTPROCESS_COMMAND =+ "\
    rm -rf ${IMAGE_ROOTFS}/etc/systemd/
system/multi-user.target.wants/recipeA.service; \
    ln -sf ${IMAGE_ROOTFS}/lib/systemd/system/recipeB.service' '
${IMAGE_ROOTFS}/etc/systemd/system/multi-user.target.wants/recipeB.service;
\
 "



2014-03-10 11:55 GMT+00:00 Katu Txakur <katutxakurra at gmail.com>:

> Thanks Khem,
>
> I found my mistake. I forgot adding ${IMAGE_ROOTFS} and I was trying to
> run the commands in my host. This works.
>
> ROOTFS_POSTPROCESS_COMMAND =+ "\
>     rm -rf
> ${IMAGE_ROOTFS}/etc/systemd/system/multi-user.target.wants/recipeA.service;
> \
>     ln -sf ${IMAGE_ROOTFS}/lib/systemd/system/recipeB.service'
> '/etc/systemd/system/multi-user.target.wants/recipeB.service; \
>  "
>
> regards,
> Katu
>
>
> 2014-03-04 22:45 GMT+00:00 Khem Raj <raj.khem at gmail.com>:
>
> On Tue, Mar 4, 2014 at 6:38 AM, Katu Txakur <katutxakurra at gmail.com>
>> wrote:
>> > Sorry, I sent it uncompleted by mistake.
>> >
>> > I've also tried
>> >
>> > ROOTFS_POSTPROCESS_COMMAND =+ "\
>> >     rm -rf /etc/systemd/system/multi-user.target.wants/recipeA.service;
>> \
>> > "
>> >
>> > but it didn't work either. Anyone knows how to do this?
>> >
>>
>> you can mask the service via a postprocess command something like
>> systemctl --root=${D} mask <yourservice>.service
>>
>>
>> > Thanks,
>> > Katu
>> >
>> >
>> > 2014-03-04 14:37 GMT+00:00 Katu Txakur <katutxakurra at gmail.com>:
>> >
>> >> Hi,
>> >>
>> >> I'm using Yocto 1.3 and I've created some recipes. All of them have
>> >> systemd services. Some of them start at boot time and others don't.
>> Let's
>> >> say for example:
>> >> recipeA_1.0.bb > SYSTEMD_AUTO_ENABLE_${PN}-systemd = "enable"
>> >> recipeB_1.0.bb > SYSTEMD_AUTO_ENABLE_${PN}-systemd = "disable"
>> >>
>> >> I want to create two image.bb files. One of them will start A and the
>> >> other one will start B. I've tried adding
>> >>
>> >> imageB.bb
>> >> .....
>> >> SYSTEMD_AUTO_ENABLE_recipeA-systemd = "disable"
>> >> SYSTEMD_AUTO_ENABLE_recipeB-systemd = "enable"
>> >> .....
>> >>
>> >> I've also tried
>> >>
>> >>
>> >
>> >
>> > _______________________________________________
>> > yocto mailing list
>> > yocto at yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/yocto
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20140311/ad7c8b96/attachment.html>


More information about the yocto mailing list