util: Combine systemd value parsers

We want to use the same function for parsing out the last property of
a systemd file. This combines all of the lookups into a single function.

Change-Id: I590d31e5e1019cd38a78d640188e486b8854a544
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/dhcp_configuration.hpp b/src/dhcp_configuration.hpp
index f35701b..8174ec7 100644
--- a/src/dhcp_configuration.hpp
+++ b/src/dhcp_configuration.hpp
@@ -43,16 +43,7 @@
      *  @param[in] parent - Parent object.
      */
     Configuration(sdbusplus::bus_t& bus, const std::string& objPath,
-                  Manager& parent) :
-        Iface(bus, objPath.c_str(), Iface::action::defer_emit),
-        bus(bus), manager(parent)
-    {
-        ConfigIntf::dnsEnabled(getDHCPPropFromConf("UseDNS"));
-        ConfigIntf::ntpEnabled(getDHCPPropFromConf("UseNTP"));
-        ConfigIntf::hostNameEnabled(getDHCPPropFromConf("UseHostname"));
-        ConfigIntf::sendHostNameEnabled(getDHCPPropFromConf("SendHostname"));
-        emit_object_added();
-    }
+                  Manager& parent);
 
     /** @brief If true then DNS servers received from the DHCP server
      *         will be used and take precedence over any statically
@@ -84,11 +75,6 @@
      */
     bool sendHostNameEnabled(bool value) override;
 
-    /** @brief read the DHCP Prop value from the configuration file
-     *  @param[in] prop - DHCP Prop name.
-     */
-    bool getDHCPPropFromConf(const std::string& prop);
-
     /* @brief Network Manager needed the below function to know the
      *        value of the properties (ntpEnabled,dnsEnabled,hostnameEnabled
               sendHostNameEnabled).