Comment 5 for bug 1906970

Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: dpkg hook hostname error

That indeed contains the offending "search .".
Since the file is managed by systemd-resolved the question becomes where exactly that comes from.

To ensure this is the case check /run/systemd/resolve/stub-resolv.conf which is the file that pushes info from systemd-resolved into resolv.conf.
There it should also have the "search ." entry.

Furthermore you can check which connection of yours is proving that.
 $ systemd-resolve --status

In my example /run/systemd/resolve/stub-resolv.con
holds "search fritz.box buildd" of which I can see in --status that "buildd" is from a VPN connection I have and "fritz.box" is from my local router (seen on lan and wlan interface).

That could be the first step to get a feeling "where it is coming from"

It could be:
- from your dhcp server that pushed this search domain
- from your local dhcp config that has an entry to append this search domain
- "search" statement via local config in /etc/netplan/*
- as config of "Domains=" in /etc/systemd/resolved.conf
- somewhere buried int he network-manager gui (If you are on a desktop)
- ... (I might have missed one)

But the next step IMHO is to find where that config really comes from to adapt/fix it there.