From: Jason A. Donenfeld Date: Fri, 23 May 2025 18:59:38 +0000 (+0200) Subject: wg-quick: linux: deal with resolvconf migration more gracefully X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3b40aff964789a2a0533cb7a070592a75a996e3;p=thirdparty%2Fwireguard-tools.git wg-quick: linux: deal with resolvconf migration more gracefully When Ubuntu systems upgrade from Debian's atrocious resolvconf to the systemd-resolve symlink, they sometimes leave around /etc/resolvconf/interface-order, which then winds up breaking the detection and passing the bogus 'tun.' prefix to systemd's resolvconf, resulting in failure. Work around this by only doing the 'tun.' prefix hack if resolvconf isn't a symlink. This is ugly but so it goes. Reported-by: Andrei Borzenkov Signed-off-by: Jason A. Donenfeld --- diff --git a/src/wg-quick/linux.bash b/src/wg-quick/linux.bash index f56f6e4..af255af 100755 --- a/src/wg-quick/linux.bash +++ b/src/wg-quick/linux.bash @@ -143,7 +143,7 @@ set_mtu_up() { } resolvconf_iface_prefix() { - [[ -f /etc/resolvconf/interface-order ]] || return 0 + [[ -f /etc/resolvconf/interface-order && ! -L $(type -P resolvconf) ]] || return 0 local iface while read -r iface; do [[ $iface =~ ^([A-Za-z0-9-]+)\*$ ]] || continue