Re: [systemd] Behavior of "Requires" and "After" in service unit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PFA the service files I am using with this case. I have also tried service type set to “oneshot” in swupdate core service but not change in behavior was observed.

 

From: Hamza, Muhammad
Sent: Monday, May 9, 2022 9:10 AM
To: 'systemd-devel@xxxxxxxxxxxxxxxxxxxxx' <systemd-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: [systemd] Behavior of "Requires" and "After" in service unit

 

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@xxxxxxxxxxx
www.sw.siemens.com


 

Attachment: swupdate.service
Description: swupdate.service

Attachment: swupdate-usb@.service
Description: swupdate-usb@.service


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux