sudo cp -p /etc/network/if-up.d/resolved /etc/network/if-up.d/.resolved.broken-orig #Edit /etc/network/if-up.d/resolved and take out the extraneous quotes on lines 48 and 52 #The fix looks like: diff /etc/network/if-up.d/.resolved.broken-orig /etc/network/if-up.d/resolved 48c48 < "$DNS"="$NEW_DNS" --- > $DNS="$NEW_DNS" 52c52 < "$DOMAINS"="$NEW_DOMAINS" --- > $DOMAINS="$NEW_DOMAINS"
At least, this appears to be effective.
Recently upgraded an older system to Ubuntu 22.04.1 LTS via
do-release-upgrade and ran into DNS issues, error messages were:
nslookup google.com Server: 127.0.0.53 Address: 127.0.0.53#53 ** server can't find google.com: SERVFAIL
/etc/network/if-down.d/resolved: 12: mystatedir: not found /etc/network/if-up.d/resolved: 71: DNS: not found /etc/network/if-up.d/resolved: 1: /run/network/ifupdown-inet-em1: DNS=220.127.116.11: not found /etc/network/if-up.d/resolved: 2: /run/network/ifupdown-inet-em1: DOMAINS=local_search_domain.com: not found Failed to parse DNS server address: DNS Failed to set DNS configuration: Invalid argument
when attempting to run an
nslookup via a network connection (em1) defined in /etc/network/interfaces prior to the system upgrade.
After a period of self-soothing I located https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1981103 and https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1910273 which helped enhance my calm. It appears that, at a minimum, the errors encountered were due to a pair of typos in /etc/network/if-up.d/resolved which are easily fixed with a text editor; after manually removing the extraneous quotes I am able to bring up the network interface and query DNS servers. It's unclear to me if there are other issues with the
ifupdown package currently shipped by Ubuntu 22.04.1 LTS (0.8.36+nmu1ubuntu3) or the manual edit I described above. Are there any documented fixes that don't involve editing lines 48 and 52 of /etc/network/if-up.d/resolved or is this the best workaround currently available for legacy systems that have been upgraded to Ubuntu 22.04.1 LTS?