[yocto] Make the service the last run in boot
ChenQi
Qi.Chen at windriver.com
Thu Aug 1 02:17:13 PDT 2019
On 08/01/2019 03:37 PM, JH wrote:
> Hi,
>
> How can I find the systemd last run service I can put it in my network
> application After=<last run tartget or service>?
>
> I need my network application service to be run at last in boot, I
> made After=connman and Requires=connman.service that did not work,
> always failed in boot, I have to manually restart the network
> application service which won't work in field operation.
I'd suggest you find out what you network service actually require.
> Searched from Internet, there is a blog Systemd: Run it last to create
> a custom.target After=multi-user.target, and put my network
> application service WantedBy=custom.target, that works well, but it is
> a little bit cumbersome to configure customer.target in Yocto bb file,
> enabling the customer.target is called systemctl isolate
> custom.target, the /etc/systemd/system/default.target link needs be
> changed to from multi-user.target to custom.target. I am not sure how
> it could be done in do_install, appreciate your tips.
>
> Thank you.
>
> Kind regards,
>
> - JH
More information about the yocto
mailing list