From 42b791068adfca9a240ac16712158bbf49686537 Mon Sep 17 00:00:00 2001 From: Jim Hennessy Date: Sat, 1 Dec 2018 15:27:56 -0500 Subject: [PATCH] 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. --- vpnc-script | 3 ++- vpnc-script.spec | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/vpnc-script b/vpnc-script index ae13947..c401918 100644 --- a/vpnc-script +++ b/vpnc-script @@ -131,7 +131,8 @@ if [ -r /etc/openwrt_release ] && [ -n "$OPENWRT_INTERFACE" ]; then elif [ -x /usr/bin/busctl ] && [ ${RESOLVEDENABLED} = 1 ]; then # For systemd-resolved (version 229 and above) MODIFYRESOLVCONF=modify_resolved_manager RESTORERESOLVCONF=restore_resolved_manager -elif [ -x /sbin/resolvconf ]; then # Optional tool on Debian, Ubuntu, Gentoo and FreeBSD +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 elif [ -x /sbin/netconfig ]; then # tool on Suse after 11.1 diff --git a/vpnc-script.spec b/vpnc-script.spec index f1c6ab9..2a72106 100644 --- a/vpnc-script.spec +++ b/vpnc-script.spec @@ -3,7 +3,7 @@ Name: vpnc-script Version: %{git_date} -Release: 3.git%{git_commit_hash}%{?dist} +Release: 4.git%{git_commit_hash}%{?dist} Summary: Routing setup script for vpnc and openconnect Group: Applications/Internet @@ -35,6 +35,9 @@ install -m 0755 vpnc-script \ %{_sysconfdir}/vpnc/vpnc-script %changelog +* Sat Dec 01 2018 James Hennessy +- Fixed issue where vpnc-script is using resolvconf on systems where "resolve" isn't enabled in /etc/nsswitch. + * Sat Jul 14 2018 Fedora Release Engineering - 20171004-3.git6f87b0f - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild