[systemd-devel] [systemd] Behavior of "Requires" and "After" in service unit
Hamza, Muhammad
Muhammad_Hamza at mentor.com
Mon May 9 04:09:48 UTC 2022
Hello,
I am trying to use swupdate services to perform updates on my BSP but there is a problem that I am facing.
When update usb is plugged in during the boot time, swupdate core and swupdate-usb service run right after
each-other where swupdate-usb service is dependent on swupdate-core service. Therefore, the update fails as
core has not initialized yet when swupdate-usb launches the client.
I have tried adding service type as "exec" in swupdate core service and have tried both Requires and After in swupdate-usb
service but in all case swupdate-usb does not wait for core to be initialized completely before launching.
My understanding is that when service type is set to exec service manager will only assume that swupdate core service is
launched once main process of core is executed and with "Requires" set in swupdate-usb service it should wait till
swupdate core service has executed its main process and is assumed launched.
Can you please clarify the behavior of dependency in such cases and how it can be resolved.
Regards,
Muhammad Hamza
Siemens Industry Software (Private) Limited
Pakistan Engineering
6th Floor Ali Tower M. M. Alam Road Gulberg III
Lahore Pakistan, 54660
hamza.muhammad.ext at siemens.com<mailto:hamza.muhammad.ext at siemens.com>
www.sw.siemens.com<http://www.sw.siemens.com/>
[cid:image001.png at 01D85BDC.C6596630]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220509/c419f7d6/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 2887 bytes
Desc: image001.png
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220509/c419f7d6/attachment-0001.png>
More information about the systemd-devel
mailing list