cfam-reset: do not run if chassis power on
Due to a variety of reasons, the op-cfam-reset.service was put in the
obmc-chassis-poweron@.target. To handle situations where the BMC is
reset when the host is up, it's important this service not be executed
if the host is running. Issuing a CFAM reset while the host is running
will cause it to crash.
Change the service directive to look at the chassis power file to know
whether it should run or not.
Tested:
- Verified on a rainier system that host stayed up and running through a
BMC reset with this change.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I103defecf113e6cc8f7eba4dd9d7c47519621015
diff --git a/op-cfam-reset.service.in b/op-cfam-reset.service.in
index 3376c8a..07fc69f 100644
--- a/op-cfam-reset.service.in
+++ b/op-cfam-reset.service.in
@@ -9,7 +9,7 @@
Conflicts=obmc-host-stop@0.target
Conflicts=obmc-chassis-poweroff@0.target
ConditionPathExists=!/run/openbmc/mpreboot@0
-ConditionPathExists=!/run/openbmc/host@0-on
+ConditionPathExists=!/run/openbmc/chassis@0-on
[Service]
RemainAfterExit=yes