]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
Don't use /sbin/resolvconf if it just points to resolvectl.
authorJames Hennessy <jphxxxx@gmail.com>
Sun, 17 Feb 2019 19:18:05 +0000 (14:18 -0500)
committerDaniel Lenski <dlenski@gmail.com>
Mon, 30 Nov 2020 02:11:19 +0000 (18:11 -0800)
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 <dlenski@gmail.com>
vpnc-script

index 86c15ace944ed7fd850c294651177063c5627b51..1a741e496c14825fb2df8682b8f66da4372cd84d 100755 (executable)
@@ -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