Terrific, that works well, thanks Rudolf and ChenQi.
On 8/2/19, Rudolf J Streif <[email protected]> wrote: > Adding > > After=multi-user.target > > to the [Unit] section in your systemd service file should do what you want. > > :rjs > > On 8/1/19 4:08 AM, JH wrote: >> The application requires network connection to communicate services >> via Internet, it could only work if the network connection is ready, >> so I really want to know which system servuce run at last I could put >> it in the After statement. >> >> On 8/1/19, ChenQi <[email protected]> wrote: >>> 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 >>> >>> -- >>> _______________________________________________ >>> yocto mailing list >>> [email protected] >>> https://lists.yoctoproject.org/listinfo/yocto >>> > -- > ----- > Rudolf J Streif > CEO/CTO ibeeto > +1.855.442.3396 x700 > > > -- _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
