package/systemd: create /etc/resolv.conf only if resolved is selected
Or else it becomes a dangling link to /run/systemd/resolve/resolv.conf, which is never created. Even worst, it also prevents NetworkManager from updating resolv.conf. Fixes: https://bugs.busybox.net/show_bug.cgi?id=9881 Signed-off-by: Carlos Santos <unixmania@gmail.com> Reviewed-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
f1cb8ca218
commit
0e51737575
|
@ -354,10 +354,6 @@ define SYSTEMD_INSTALL_SERVICE_NETWORKD
|
|||
ln -sf ../../../../lib/systemd/system/systemd-network-generator.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/network-pre.target.wants/systemd-network-generator.service
|
||||
endef
|
||||
define SYSTEMD_INSTALL_RESOLVCONF_HOOK
|
||||
ln -sf ../run/systemd/resolve/resolv.conf \
|
||||
$(TARGET_DIR)/etc/resolv.conf
|
||||
endef
|
||||
SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
|
||||
ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),)
|
||||
define SYSTEMD_INSTALL_NETWORK_CONFS
|
||||
|
@ -371,6 +367,10 @@ SYSTEMD_CONF_OPTS += -Dnetworkd=false
|
|||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y)
|
||||
define SYSTEMD_INSTALL_RESOLVCONF_HOOK
|
||||
ln -sf ../run/systemd/resolve/resolv.conf \
|
||||
$(TARGET_DIR)/etc/resolv.conf
|
||||
endef
|
||||
SYSTEMD_CONF_OPTS += -Dresolve=true
|
||||
SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager
|
||||
define SYSTEMD_INSTALL_SERVICE_RESOLVED
|
||||
|
|
Loading…
Reference in a new issue