From: James Hennessy Date: Sun, 17 Feb 2019 19:18:05 +0000 (-0500) Subject: Don't use /sbin/resolvconf if it just points to resolvectl. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=bda05f92752c5f9710b5aaf4d2981b8eb01e0d9a;p=users%2Fdwmw2%2Fvpnc-scripts.git Don't use /sbin/resolvconf if it just points to resolvectl. On Fedora 29 systems, resolvconf is a symbolic link to resolvectl, but using resolvectl won't work unless "resolve" appears on the "hosts" line of /etc/nsswitch. If we reach the point of considering resolvconf, then "resolve" is not enabled and resolvectl should be avoided. Signed-off-by: Daniel Lenski --- diff --git a/vpnc-script b/vpnc-script index 86c15ac..1a741e4 100755 --- a/vpnc-script +++ b/vpnc-script @@ -143,7 +143,7 @@ elif [ -x /usr/bin/busctl ] && [ ${RESOLVEDENABLED} = 1 ]; then # For systemd-resolved (version 229 and above) MODIFYRESOLVCONF=modify_resolved_manager_old RESTORERESOLVCONF=restore_resolved_manager_old -elif [ -x /sbin/resolvconf ]; then +elif [ -x /sbin/resolvconf -a "$(basename $(readlink /sbin/resolvconf))" != 'resolvectl' ]; then # Optional tool on Debian, Ubuntu, Gentoo and FreeBSD MODIFYRESOLVCONF=modify_resolvconf_manager RESTORERESOLVCONF=restore_resolvconf_manager