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

Reindl Harald h.reindl at thelounge.net
Thu Nov 1 09:15:14 UTC 2018



Am 01.11.18 um 09:34 schrieb piliu:
> I encounter an issue during the poweroff. In my bash script, firstly I
> use poweroff cmd to start systemd-poweroff.service, and use reboot cmd
> as a bake up if the poweroff fails. But during tests, many times, the
> machine is rebooted directly, without waiting for the result of poweroff.
> Since both of the cmds use "systemctl" without --no-block option, so I
> think they should execute one-by-one. But the test result is not.
> Any suggestion?

just don't do that!

when power-off fails reboot would fail too and so that all makes no
sense - the only differnece between reboot and power off is the action
after OS shutdown


More information about the systemd-devel mailing list