[systemd-devel] A question about the race condition between two service

Cristian Rodríguez crrodriguez at opensuse.org
Tue Nov 6 12:12:00 UTC 2018



El 05-11-2018 a las 3:17, piliu escribió:

> During this service, the power state can not be got from sysfs, neither
> it can be got by systemd's utility. So is it acceptable to signal the
> failure of service by a tmp file under /tmp ? I.e adding
> FailureAction=touch /tmp/poweroff_fail in systemd-poweroff.service.

No, that will likely race too.. please focus on why you think you need 
this contrieved,hackish solution.

If as you say in your other message, if you start just one operation, 
either reboot or poweroff but not both it will be ok.






More information about the systemd-devel mailing list