summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2019-02-12 19:03:15 -0800
committerWilliam A. Kennington III <wak@google.com>2019-03-12 12:51:58 -0700
commit483e777fd4161ba063ac67a8114429c9b2078352 (patch)
tree9f4c741695e4ac9c4e7a400b247c0e227905014f
parent04c3d714ba0129f4746967f2d98985bae2b0a8fd (diff)
downloadphosphor-networkd-483e777fd4161ba063ac67a8114429c9b2078352.tar.gz
phosphor-networkd-483e777fd4161ba063ac67a8114429c9b2078352.zip
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>
-rw-r--r--configure.ac8
-rw-r--r--network_manager_main.cpp7
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());
}
OpenPOWER on IntegriCloud