power_state: Catch DBusServiceError and wait
Update to catch the DBusServiceError exception for the service owning
the `org.openbmc.control.Power` interface with the `pgood` property not
being on dbus yet and wait for a propertiesChanged signal for when the
service starts.
This is necessary for starting any of the fan applications using the
PGoodState object at multi-user.target in case they start prior to the
service noted above starting.
Change-Id: I2e07acc020ed21253c272c8d20346058b06e78bc
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/power_state.hpp b/power_state.hpp
index ee3eff8..dc74707 100644
--- a/power_state.hpp
+++ b/power_state.hpp
@@ -202,14 +202,9 @@
_powerState = static_cast<bool>(pgood);
}
- catch (const util::DBusError& e)
+ catch (const util::DBusServiceError& e)
{
- using namespace phosphor::logging;
- log<level::ERR>(
- fmt::format("Could not find PGOOD interface {} on D-Bus",
- _pgoodInterface)
- .c_str());
- throw;
+ // Wait for propertiesChanged signal when service starts
}
}