systemd/cpi.service: Add sysinit.target dependency to make sure /var is created

Noticed on RHEL CoreOS that the CPI service failed to start with:

"Cannot access lock file: /var/lock/cpictl.lock"

This was a timing issue where /var was not created yet and the symlink
to /run/lock was not present. Add sysinit.target to fix this.
This fix has been tested with RHEL CoreOS.

Closes: https://github.com/ibm-s390-tools/s390-tools/pull/82
Signed-off-by: Prashanth Sundararaman <psundara@redhat.com>
Suggested-by: Colin Walters <walters@verbum.org>
Reviewed-by: Dan Horák <dan@danny.cz>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Prashanth Sundararaman
2020-03-09 14:13:22 -04:00
committed by Jan Höppner
parent 93e4249fd3
commit 3ae2100d5e

View File

@@ -10,7 +10,7 @@
Description=Apply Control Program Identification (CPI)
DefaultDependencies=no
Conflicts=shutdown.target
After=local-fs.target
After=sysinit.target
ConditionPathIsReadWrite=/sys/firmware/cpi
[Service]