[yocto] Best practice dynamic service file

Jonas Andersson jonaskgandersson at gmail.com
Mon Mar 4 21:48:54 PST 2019

Thanks for the tip, it is a bit sleeker than pulling in an python script.

Den tis 5 mars 2019 kl 02:05 skrev ChenQi <Qi.Chen at windriver.com>:

> On 03/05/2019 05:46 AM, Jonas Andersson wrote:
> Hi,
> I have an systemd recipe to start an application as a service, i have
> included an service file.
> Now I am looking for an solution to be able to set settings in the service
> file from Yocto variables, i have found recipes that use python to build
> files during build.
> What is best practice for this?
> /Jonas
> Use placeholders like VAR_TO_SUBSTITUDE, and then use 'sed' command to
> replace it in do_install.
> e.g.
> sed -i -e 's/VAR_TO_SUBSTITUDE/${VAR_IN_RECIPE}/g' path/to/my.service
> Best Regards,
> Chen Qi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190305/0a559dc1/attachment.html>

More information about the yocto mailing list