FruDevice: Correct the host on match string

When the CurrentHostState D-Bus property value ends with "Running",
FruDevice detects the host as running and starts rescan all D-Bus to
find new Fru devices. From the commit "host state transitioning
support", phosphor-state-manager package supports the transition state
"TransitioningToRunning". This state will be also updated to
CurrentHostState property. This causes FruDevice detects the host is
running when host is transiting to running state.
This commit fixs that issue.

Tested:
1. Power off the host.
2. Power on the host.
3. Make sure FruDevice only rescans bus when the
CurrentHostState is xyz.openbmc_project.State.Host.HostState.Running.

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I1d307352ee37245816f9b132cd99b7a54a765db7
diff --git a/src/fru_device.cpp b/src/fru_device.cpp
index 60142d0..ed55e4a 100644
--- a/src/fru_device.cpp
+++ b/src/fru_device.cpp
@@ -1414,8 +1414,11 @@
             auto findState = values.find("CurrentHostState");
             if (findState != values.end())
             {
-                powerIsOn = boost::ends_with(
-                    std::get<std::string>(findState->second), "Running");
+                if (std::get<std::string>(findState->second) ==
+                    "xyz.openbmc_project.State.Host.HostState.Running")
+                {
+                    powerIsOn = true;
+                }
             }
 
             if (powerIsOn)