[systemd-devel] Method to Wait for service to complete

Harry Goldschmitt Harry.Goldschmitt at quantum.com
Sun Aug 16 15:26:45 PDT 2015


On 8/12/15 12:32 PM, killermoehre wrote:
> Am 12.08.2015 um 20:34 schrieb Harry Goldschmitt:
>> I have a service that has to complete before boot can continue. Is there
>> an “approved” method for doing this?
>>
>>  
>>
>> I have an ugly solution I’ve come up with… I’ve created a foo.target to
>> run my foo.service and set the default.target to my foo.target. After my
>> foo.service completes, I’m issuing “systemctl isolate multi-user” to
>> complete the boot.
>>
>>  
>>
>> Any help would be appreciated.
>>
>>  
>>
>> Harry
> Because my first answer wasn't send to the ML, here again:
>
>> Hello Harry,
>>
>> so the first question here always is: why do you think your service
>> is so important that no other service should be run at the same time?
>> Can you give us more information about your service? Some
>> explanaition what it does and why it should run before boot completes
>> (which is quite the funny thing, because "boot end" is never defined
>> with systemd, because everyting is brought up in parallel only taking
>> dependencies in account).
>>
>> Regards
> Harrys answer
>
>> My product is a Linux network appliance and my service updates
>> platform and peripheral firmware as needed without human
>> intervention. For the updates to take effect, the platform needs to
>> be rebooted after updates. If a network card needs new firmware, the
>> network is shut down before the update. If a peripheral needs to be
>> updated, it is shutdown, too. It would probably be a bad idea to let
>> users log into the appliance only to shutdown peripherals and then
>> reboot after a firmware update. In addition we have several services
>> that should not be brought up before it is known that firmware needs
>> to be updated.
>>
>> Before systemd, we just ran the service early in the boot process.
>> 99.9% of the time the service did nothing and boot continued. If
>> something had to be updated, the service did the update and rebooted.
> In the end after I got his answer it boils down to
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.freedesktop.org_wiki_Software_systemd_SystemUpdates_&d=BQIDaQ&c=8S5idjlO_n28Ko3lg6lskTMwneSC-WqZ5EBTEEvDlkg&r=naTX-IF7_QKyhqVve7SqbI_X3j-x4BDG1qRD3DBP5SU&m=ZM6b57JGl756Bwbd0UsC6ZGXt3aD-B8GRzrA_4gID2Y&s=fDLbpYg1uEoUgEUfFPmQiEPkfpiAXiaRn1AMycnZbT8&e= 
>
> Regards
>
Thank you. That's exactly what I need.

Harry

----------------------------------------------------------------------
The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through anti virus and spam software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.


More information about the systemd-devel mailing list