mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
systemd/cpi.service: fix race condition between stopping unit and shutdown
There is a race condition between stopping the cpi systemd service and systemd getting a request to exit the main loop, so it may proceed with shutdown before all pending stop jobs have been processed. Therefore, add `Before=shutdown.target` as it would have been added by the (deactivated) default dependencies. [1] While at it, sort the directives. [1] https://www.freedesktop.org/software/systemd/man/systemd.service.html#Default%20Dependencies Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
7bb41732fb
commit
bbe92b9cd3
@@ -7,11 +7,12 @@
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Apply Control Program Identification (CPI)
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
After=sysinit.target
|
||||
Before=shutdown.target
|
||||
ConditionPathIsReadWrite=/sys/firmware/cpi
|
||||
Conflicts=shutdown.target
|
||||
DefaultDependencies=no
|
||||
Description=Apply Control Program Identification (CPI)
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
||||
Reference in New Issue
Block a user