diff options
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | network_manager_main.cpp | 7 |
2 files changed, 5 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index bea6f98..f8c2ef8 100644 --- a/configure.ac +++ b/configure.ac @@ -105,10 +105,6 @@ if test "x$enable_link_local_autoconfiguration" = "xyes"; then 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 @@ AC_ARG_VAR(OBJ_NETWORK, [The network manager DBus object path]) 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::level; 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 @@ int main(int argc, char* argv[]) // 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 @@ int main(int argc, char* argv[]) // 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()); } |