configure: Don't allow configurable systemd directories

They are not actually variable and defined statically in systemd. This
will make porting to other build systems easier so that we don't have to
duplicate this functionality.

Change-Id: I7752cf4caf12d4424e21cd04276e0f87ecddc335
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/configure.ac b/configure.ac
index bea6f98..f8c2ef8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,10 +105,6 @@
     AC_DEFINE([LINK_LOCAL_AUTOCONFIGURATION], [1], [Enable link-local IP address autoconfiguration])
 fi
 
-AC_ARG_VAR(DNS_ENTRY_FILE, [File having DNS entries supplied by DHCP])
-AS_IF([test "x$DNS_ENTRY_FILE" == "x"], [DNS_ENTRY_FILE="/run/systemd/netif/state"])
-AC_DEFINE_UNQUOTED([DNS_ENTRY_FILE], ["$DNS_ENTRY_FILE"], [File having DNS entries supplied by DHCP])
-
 AC_ARG_VAR(BUSNAME_NETWORK, [The Dbus busname to own])
 AS_IF([test "x$BUSNAME_NETWORK" == "x"], [BUSNAME_NETWORK="xyz.openbmc_project.Network"])
 AC_DEFINE_UNQUOTED([BUSNAME_NETWORK], ["$BUSNAME_NETWORK"], [The DBus busname to own])
@@ -117,10 +113,6 @@
 AS_IF([test "x$OBJ_NETWORK" == "x"], [OBJ_NETWORK="/xyz/openbmc_project/network"])
 AC_DEFINE_UNQUOTED([OBJ_NETWORK], ["$OBJ_NETWORK"], [The network manager DBus object path])
 
-AC_ARG_VAR(NETWORK_CONF_DIR, [Network configuration directory])
-AS_IF([test "x$NETWORK_CONF_DIR" == "x"], [NETWORK_CONF_DIR="/etc/systemd/network"])
-AC_DEFINE_UNQUOTED([NETWORK_CONF_DIR], ["$NETWORK_CONF_DIR"], [Network configuration directory])
-
 AC_ARG_VAR(SYSTEMD_TARGET, "Target for starting this service")
 AS_IF([test "x$SYSTEMD_TARGET" == "x"], [SYSTEMD_TARGET="multi-user.target"])
 
diff --git a/network_manager_main.cpp b/network_manager_main.cpp
index dfaeecc..3dcefe5 100644
--- a/network_manager_main.cpp
+++ b/network_manager_main.cpp
@@ -23,6 +23,9 @@
 using phosphor::logging::log;
 using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
 
+constexpr char NETWORK_STATE_FILE[] = "/run/systemd/netif/state";
+constexpr char NETWORK_CONF_DIR[] = "/etc/systemd/network";
+
 namespace phosphor
 {
 namespace network
@@ -133,7 +136,7 @@
 
     // DNS entry handler
     phosphor::network::inotify::Watch watch(
-        eventPtr, DNS_ENTRY_FILE,
+        eventPtr, NETWORK_STATE_FILE,
         std::bind(&phosphor::network::dns::updater::processDNSEntries,
                   std::placeholders::_1));
 
@@ -141,7 +144,7 @@
     // events. However, if the file is already populated before this, then
     // they won't ever get notified and thus we need to read once before
     // waiting on change events
-    phosphor::network::dns::updater::processDNSEntries(DNS_ENTRY_FILE);
+    phosphor::network::dns::updater::processDNSEntries(NETWORK_STATE_FILE);
 
     sd_event_loop(eventPtr.get());
 }