summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2022-04-20 21:48:37 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-04-22 22:22:12 +0300
commitad7adea6fe057420ee04260a66b30bbdae395e2b (patch)
tree1cc6c258ddc8aadc3b980ae7db723b77345778fa
parent3952f8bd49b30590df75e8b86627e4087d73a387 (diff)
downloadopenbmc-ad7adea6fe057420ee04260a66b30bbdae395e2b.tar.xz
phosphor-state-manager: move host symlinks to correct subpkg
The `multi-user.target.requires/...Host@{i}.service` symlinks were being added to the `obmc-targets` sub-package, but nothing explicitly depends on the `host` sub-package. On systems that do not include the `host` sub-package, this could result in broken symlinks, and on systems which do not use the targets it can result in the `host` daemon not starting. Move these `Host@{i}.service` symlinks into the `host` sub-package since that is where the original service file resides. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I43aa5fdbe73f0af3c5d213e45e3a02f2dc093d79
-rw-r--r--meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc23
1 files changed, 22 insertions, 1 deletions
diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
index 6b0bda0ac7..52bbb05b75 100644
--- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
+++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
@@ -1,5 +1,4 @@
DEFAULT_TARGETS = " \
- multi-user.target.requires/xyz.openbmc_project.State.Host@{}.service \
multi-user.target.requires/obmc-host-reset@{}.target \
multi-user.target.requires/phosphor-discover-system-state@{}.service \
obmc-chassis-poweron@{}.target.wants/phosphor-reset-host-recovery@{}.service \
@@ -62,6 +61,18 @@ pkg_postinst:${PN}-chassis-check-power-status:append() {
done
}
+pkg_postinst:${PN}-host:append() {
+ for i in ${OBMC_HOST_INSTANCES};
+ do
+ mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
+
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Host@${i}.service"
+ TARGET="../xyz.openbmc_project.State.Host@.service"
+ ln -s $TARGET $LINK
+
+ done
+}
+
pkg_prerm:${PN}-obmc-targets:append() {
for i in ${OBMC_HOST_INSTANCES};
@@ -95,3 +106,13 @@ pkg_prerm:${PN}-chassis-check-power-status:append() {
done
}
+
+pkg_prerm:${PN}-host:append() {
+ for i in ${OBMC_HOST_INSTANCES};
+ do
+
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Host@${i}.service"
+ rm $LINK
+
+ done
+}