Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 671320

Summary: sys-apps/systemd-239-r2 force-links /etc/resolv.conf to /run/systemd/resolve/resolv.conf
Product: Gentoo Linux Reporter: gentoo
Component: Current packagesAssignee: Gentoo systemd Team <systemd>
Status: RESOLVED INVALID    
Severity: normal CC: gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description gentoo 2018-11-17 07:32:15 UTC
The line "L+! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf" in tmpfiles.d/etc.conf forces a symlink. This is especially annoying when not wanting to run systemd-resolved and masking it, making the symlinked file nonexistent. This could be hidden behind USE=resolvconf.

Reproducible: Always

Steps to Reproduce:
1. emerge -1 sys-apps/systemd
2. systemctl mask systemd-resolved.service
3. systemctl reboot
Actual Results:  
DNS resolution fails because /etc/resolv.conf is linked to /run/systemd/resolve/resolv.conf. (which doesn't exist)

Expected Results:  
resolv.conf manager of choice takes over.
Comment 1 Mike Gilbert gentoo-dev 2018-11-17 15:44:11 UTC
On my system, the line in /usr/lib/tmpfiles.d/etc.conf looks like this:

> L! /etc/resolv.conf - - - - ../run/systemd/resolve/stub-resolv.conf

This is the same entry that appears in the systemd git repo.

https://github.com/systemd/systemd/blob/v239/tmpfiles.d/etc.conf.m4#L17

This only creates a resolv.conf symlink if no file or symlink exists already.