diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2023-06-29 19:34:00 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2023-07-05 19:48:51 +0300 |
commit | 838105d85d2e024628ab43e1d87d76027903df81 (patch) | |
tree | 514184ae65c4a713c7cf980341287b733a56d76b | |
parent | b5ad410cb679767686fb9ebd5638009f47b03d34 (diff) | |
download | openbmc-838105d85d2e024628ab43e1d87d76027903df81.tar.xz |
acpi-power-state-daemon: install templated service correctly
The latest yocto update is flagging an error on machines using this
recipe. The reason appears to be because the templated services are
added to the SYSTEMD_SERVICE variable but they are not properly
installed into the filesystem.
Install the templated service file utilizing a more direct and tested
method.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I8f856e43244cc766fcec92ba9e21a6b98c9dbd03
-rw-r--r-- | meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon_%.bbappend | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon_%.bbappend b/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon_%.bbappend index 0c20dc4fbf..a472a7bd30 100644 --- a/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon_%.bbappend +++ b/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon_%.bbappend @@ -18,7 +18,6 @@ CHASSIS_INSTANCE="0" SYSTEMD_SERVICE:${PN}:append:gbs = " \ gbs-host-s0-set-failsafe.service \ gbs-host-s5-set-failsafe.service \ - gbs-host-set-boot-failsafe@${CHASSIS_INSTANCE}.service \ gbs-check-host-state.service \ gbs-host-ready.target \ " @@ -41,3 +40,20 @@ do_install:append:gbs() { install -m 0644 ${WORKDIR}/gbs-check-host-state.service ${D}${systemd_system_unitdir} install -m 0644 ${WORKDIR}/gbs-host-ready.target ${D}${systemd_system_unitdir} } + +pkg_postinst:${PN}:append() { + mkdir -p $D$systemd_system_unitdir/gbs-host-ready.target.wants + for i in ${OBMC_CHASSIS_INSTANCES}; + do + LINK="$D$systemd_system_unitdir/gbs-host-ready.target.wants/gbs-host-set-boot-failsafe@${i}.service" + TARGET="../gbs-host-set-boot-failsafe@.service" + ln -s $TARGET $LINK + done +} +pkg_prerm:${PN}:append() { + for i in ${OBMC_CHASSIS_INSTANCES}; + do + LINK="$D$systemd_system_unitdir/gbs-host-ready.target.wants/gbs-host-set-boot-failsafe@${i}.service" + rm $LINK + done +} |