summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-08-07 19:43:35 +0200
committerThomas Haller <thaller@redhat.com>2020-08-24 21:13:21 +0200
commitc1f9a0fff183f4e41349ed3879b409e757c181eb (patch)
treebaa84c4485122400df9406fccaa950a804750f8f /configure.ac
parentc752c52b767e42e5f3c88496102fe80c0538dfd0 (diff)
dns: add new "rc-manager=auto" mode
Add a new `main.rc-manager=auto` setting, that favours to use systemd-resolved (and not touch "/etc/resolv.conf" but configure it via D-Bus), or falls back to `resolvconf`/`netconfig` binaries if they are installed and enabled at compile time. As final fallback use "symlink", like before. Note that on Fedora there is no "openresolv" package ([1]). Instead, "systemd" package provides "/usr/sbin/resolvconf" as a wrapper for systemd-resolved's "resolvectl". On such a system the fallback to resolvconf is always wrong, because NetworkManager should either talk to systemd-resolved directly or not but never call "/usr/sbin/resolvconf". So, the special handling for resolvconf and netconfig is only done if NetworkManager was build with these applications explicitly enabled. Note that SUSE builds NetworkManager with --with-netconfig=yes --with-config-dns-rc-manager-default=netconfig and the new option won't be used there either. But of course, netconfig already does all the right things on SUSE. [1] https://bugzilla.redhat.com/show_bug.cgi?id=668153 Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 3 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index d6842670a2..8f8b9338f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -891,14 +891,15 @@ AC_SUBST(NM_CONFIG_DEFAULT_MAIN_DHCP, $config_dhcp_default)
AC_ARG_WITH(resolvconf, AS_HELP_STRING([--with-resolvconf=yes|no|path], [Enable resolvconf support]))
AC_ARG_WITH(netconfig, AS_HELP_STRING([--with-netconfig=yes|no], [Enable SUSE netconfig support]))
-AC_ARG_WITH(config-dns-rc-manager-default, AS_HELP_STRING([--with-config-dns-rc-manager-default=symlink|file|netconfig|resolvconf], [Configure default value for main.rc-manager setting]), [config_dns_rc_manager_default=$withval])
+AC_ARG_WITH(config-dns-rc-manager-default, AS_HELP_STRING([--with-config-dns-rc-manager-default=auto|symlink|file|netconfig|resolvconf], [Configure default value for main.rc-manager setting]), [config_dns_rc_manager_default=$withval])
if test "$config_dns_rc_manager_default" != "" -a \
+ "$config_dns_rc_manager_default" != auto -a \
"$config_dns_rc_manager_default" != file -a \
"$config_dns_rc_manager_default" != symlink -a \
"$config_dns_rc_manager_default" != netconfig -a \
"$config_dns_rc_manager_default" != resolvconf; then
AC_MSG_WARN([Unknown --with-config-dns-rc-manager-default=$config_dns_rc_manager_default setting.])
- config_dns_rc_manager_default=
+ config_dns_rc_manager_default=auto
fi
# Use netconfig by default on SUSE
AS_IF([test -z "$with_netconfig" -a -f /etc/SuSE-release], with_netconfig=yes)
@@ -912,9 +913,6 @@ if test "$with_resolvconf" = "yes"; then
AC_MSG_ERROR(cannot find resolvconf in path. Set the path explicitly via --with-resolvconf=PATH.)
fi
fi
-if test "$with_resolvconf" != "no"; then
- AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=resolvconf)
-fi
if test "$with_netconfig" = "yes"; then
AC_PATH_PROGS(with_netconfig, netconfig, yes, /sbin:/usr/sbin:/usr/local/sbin)
@@ -922,11 +920,6 @@ if test "$with_netconfig" = "yes"; then
AC_MSG_ERROR(cannot find netconfig in path. Set the path explicitly via --with-netconfig=PATH.)
fi
fi
-if test "$with_netconfig" != "no"; then
- AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=netconfig)
-fi
-
-AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=symlink)
if test "$with_resolvconf" != "no"; then
AC_DEFINE_UNQUOTED(RESOLVCONF_PATH, "$with_resolvconf", [Path to resolvconf])