Check Quiesce State before issuing auto reboot
Quiesce state was going into a reboot when
we issued a power off command. Added logic
to check the state before autoReboot occurs.
Resolves openbmc/openbmc#1475
Change-Id: I5cd9375a1c68b89e0b777ff436f90e553f2e6b32
Signed-off-by: Josh D. King <jdking@us.ibm.com>
diff --git a/host_state_manager.cpp b/host_state_manager.cpp
index 5930d8a..fd89cf6 100644
--- a/host_state_manager.cpp
+++ b/host_state_manager.cpp
@@ -324,7 +324,8 @@
this->currentHostState(server::Host::HostState::Running);
}
else if((newStateUnit == HOST_STATE_QUIESCE_TGT) &&
- (newStateResult == "done"))
+ (newStateResult == "done") &&
+ (stateActive(HOST_STATE_QUIESCE_TGT)))
{
if (Host::isAutoReboot())
{