Hi frens,
I wanted to set up a custom DNS. I have a feeling that just editing /etc/resolv.conf and write-protecting it would do the trick, but I was wondering if there's a more civil way of doing this?
I'm running runit and connman
If a /var/run/connman directory is present before connman starts, it'll drop its resolv.conf there instead of overwriting the one in /etc.
Since you're under runit, the simplest way to ensure this folder is present is adding this line to
/etc/runit/sv/connmand/conf:
mkdir -p /var/run/connman
By the way, the ArchWiki actually says this, but in a very systemd-specific way (https://wiki.archlinux.org/title/ConnMan#Avoiding_conflicts_with_local_DNS_server).
sounds reasonable, but will it use the one in /etc?
https://wiki.archlinux.org/title/Domain_name_resolution#Overwriting_of_/etc/resolv.conf
https://man.archlinux.org/man/resolv.conf.5
It always uses, it's hardcoded in the C library.