summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/state
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2020-09-25 17:23:51 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-09-30 01:00:04 +0300
commitd3f1e5b1dc676bbce4bb28cda04e3305c18e1125 (patch)
tree7d14c1410e58988785ae28ec407960a3913d416d /meta-phosphor/recipes-phosphor/state
parent4b5211d52cef3c6d27532046c056e63ccd24bb0b (diff)
downloadopenbmc-d3f1e5b1dc676bbce4bb28cda04e3305c18e1125.tar.xz
phosphor: ensure host state sensors cleared on host stop
With some of the new targets like obmc-host-diagnostic-mode, the BMC can be a while in these targets before other ones are started which start initializing these sensors again. Need to be sure to reset them to defaults once the host is stopped for any reason. This ensures that other BMC software which is looking at these to know host boot state have the correct information. Tested: - Verified sensors were reset when starting obmc-host-diagnostic-mode target (From meta-phosphor rev: 6f640bd9fcabae0affc0883940e47bdd5a13e752) Change-Id: Iee12327b769ffed03dabb050fd4eed8137f76fe0 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/state')
-rw-r--r--meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc8
1 files changed, 8 insertions, 0 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 c6ec8ea8b..4803cac1e 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
@@ -31,6 +31,11 @@ pkg_postinst_${PN}-obmc-targets_append() {
TARGET="../phosphor-reset-host-running@.service"
ln -s $TARGET $LINK
+ mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants
+ LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service"
+ TARGET="../phosphor-reset-sensor-states@.service"
+ ln -s $TARGET $LINK
+
mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires
LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target"
TARGET="../obmc-chassis-poweroff@.target"
@@ -89,6 +94,9 @@ pkg_prerm_${PN}-obmc-targets_append() {
LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-sensor-states@0.service"
rm $LINK
+ LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service"
+ rm $LINK
+
LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service"
rm $LINK