On Sat, Mar 24, 2018 at 6:58 AM, Tom H tomh0665@gmail.com wrote:
On Thu, Mar 22, 2018 at 11:58 AM, Artur Iwicki iwicki.artur@svgames.pl wrote:
After I installed the connman package, my system failed to resolve domain names. Even after removing connman, the errors persisted. I fiddled around with /etc/resolv.conf and noticed that I get "failed to write to linked file" errors. I performed "ls -l" and saw the following dangling symlink: /etc/resolv.conf -> /var/run/connman/resolv.conf After removing it and creating an empty file for /etc/resolf.conf, everything returned to normal.
Can the connman maintainer check if the package installs and removes itself correctly?
Can you resolve hostnames with an empty "/etc/resolv.conf"?
Have you rebooted since creating that empty file?
The second question's because I've just installed connman and it has
$ cat /usr/lib/tmpfiles.d/connman_resolvconf.conf d /var/run/connman - - - - L+ /etc/resolv.conf - - - - /var/run/connman/resolv.conf
So a "/etc/resolv.conf" symlink will be created no matter what.
AFAIUI, connman acts as a dns proxy by default.
- To set a global nameserver
Edit "/etc/connman/main.conf" and set "FallbackNameservers=nameserver_ip_address[,nameserver_ip_address_2]"
- To set a "your_service" nameserver
Run "connmanctl config {your_service} --nameservers {nameserver_ip_address} [{nameserver_ip_address_2}]"
BTW, upstream's changed the tmpfile snippet:
author Jonas Bonn jonas@southpole.se 2017-12-20 11:24:32 +0100 committer Daniel Wagner wagi@monom.org 2018-01-04 08:24:12 +0100 commit 45ccde23a90c49f5f576ab65bdd7144e70f8bbc3 (patch) tree 06e321a686d73e97a66b4a588c497be3a3fdfedc parent 4dc294bb9e9e23292988fdb98e1b66152bbf6f88 (diff) download connman-45ccde23a90c49f5f576ab65bdd7144e70f8bbc3.tar.gz
scripts: Don't forceably overwrite /etc/resolv.conf
Using L+ in the tmpfiles.d snippet is overly aggressive. These snippets are evaluated on every boot and may be evaluated on package upgrade. It's fine to check that the file /etc/resolv.conf exists, but forceably overwriting an existing file or link makes it difficult for connman to co-exist with other potential managers of /etc/resolv.conf.
Diffstat
-rw-r--r-- scripts/connman_resolvconf.conf.in 2 1 files changed, 1 insertions, 1 deletions diff --git a/scripts/connman_resolvconf.conf.in b/scripts/connman_resolvconf.conf.in index 2d61dfe..a242d7b 100644 --- a/scripts/connman_resolvconf.conf.in +++ b/scripts/connman_resolvconf.conf.in @@ -1,2 +1,2 @@ d @runstatedir@/connman - - - - -L+ /etc/resolv.conf - - - - @runstatedir@/connman/resolv.conf +L /etc/resolv.conf - - - - @runstatedir@/connman/resolv.conf