summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-openpower/recipes-phosphor/host/op-host-control/cfam_override@.service2
-rw-r--r--meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb13
2 files changed, 15 insertions, 0 deletions
diff --git a/meta-openpower/recipes-phosphor/host/op-host-control/cfam_override@.service b/meta-openpower/recipes-phosphor/host/op-host-control/cfam_override@.service
index e6bc9389c..8b773ec38 100644
--- a/meta-openpower/recipes-phosphor/host/op-host-control/cfam_override@.service
+++ b/meta-openpower/recipes-phosphor/host/op-host-control/cfam_override@.service
@@ -7,6 +7,7 @@ After=obmc-power-on@%i.target
Wants=fsi-scan@%i.service
After=fsi-scan@%i.service
Conflicts=obmc-chassis-poweroff@%i.target
+Conflicts=obmc-host-stop@%i.target
ConditionPathExists=!/run/openbmc/chassis@%i-on
ConditionPathExists=/var/lib/obmc/cfam_overrides
@@ -18,3 +19,4 @@ RemainAfterExit=yes
[Install]
WantedBy=obmc-chassis-poweron@%i.target
+WantedBy=obmc-host-startmin@%i.target
diff --git a/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb b/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb
index cd4f63bae..b8105fc8d 100644
--- a/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb
+++ b/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb
@@ -22,6 +22,14 @@ pkg_postinst_${PN}() {
LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/op-cfam-reset.service"
TARGET="../op-cfam-reset.service"
ln -s $TARGET $LINK
+
+ # Only install cfam override if p9 system
+ if [ "${@bb.utils.contains("MACHINE_FEATURES", "p9-cfam-override", "True", "False", d)}" = True ]; then
+ mkdir -p $D$systemd_system_unitdir/obmc-host-startmin@0.target.requires
+ LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/cfam_override@0.service"
+ TARGET="../cfam_override@.service"
+ ln -s $TARGET $LINK
+ fi
}
pkg_prerm_${PN}() {
@@ -29,4 +37,9 @@ pkg_prerm_${PN}() {
rm $LINK
LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/op-cfam-reset.service"
rm $LINK
+ # Only uninstall cfam override if p9 system
+ if [ "${@bb.utils.contains("MACHINE_FEATURES", "p9-cfam-override", "True", "False", d)}" = True ]; then
+ LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/cfam_override@0.service"
+ rm $LINK
+ fi
}