package/systemd: create /etc/resolv.conf only if resolvd is selected
PATCH v2 1/1 package/systemd: create /etc/resolv.conf only if resolvd is selected
From: Carlos Santos <[email protected]>
Or else it becomes a dangling link to /run/systemd/resolve/resolv.conf, which is never created. Even worst, it also prevents NewtorkManager from updating resolv.conf.
Fixes:
https://bugs.busybox.net/show_bug.cgi?id=9881
---
CC: Michael Nosthoff <[email protected]>
---
Changes v1->v2:
- Rebase after bump to version 243
--- package/systemd/systemd.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
package/systemd/systemd.mk +4 -4
@@ -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
Signature · 1 line
2.18.1
PATCH v2 1/1 package/systemd: create /etc/resolv.conf only if resolvd is selected
Carlos, All,
On 2019-10-26 13:17 -0300, unixmania at gmail.com spake thusly:
Quoted 10 lines
From: Carlos Santos <[email protected]>
Or else it becomes a dangling link to
/run/systemd/resolve/resolv.conf, which is never created. Even worst, it also prevents NewtorkManager from updating resolv.conf.Fixes:
https://bugs.busybox.net/show_bug.cgi?id=9881Signed-off-by Carlos Santos <[email protected]>
Regards,
Yann E. MORIN.
Quoted 38 lines
---
CC: Michael Nosthoff <[email protected]>
---
Changesv1->v2:
- Rebase after bump to version 243--- package/systemd/systemd.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)package/systemd/systemd.mk +4
-4@@ -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_RESOLVEDSignature · 1 line
2.18.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH v2 1/1 package/systemd: create /etc/resolv.conf only if resolvd is selected
In reply to unixmania at gmail.comQuoted 10 lines · On Sat, 26 Oct 2019 13:17:02 -0300 unixmania at gmail.com wrote:
From: Carlos Santos <[email protected]>
Or else it becomes a dangling link to
/run/systemd/resolve/resolv.conf, which is never created. Even worst, it also prevents NewtorkManager from updating resolv.conf.Fixes:
https://bugs.busybox.net/show_bug.cgi?id=9881Signed-off-by Carlos Santos <[email protected]>
Quoted 8 lines
---
CC: Michael Nosthoff <[email protected]>
---
Changesv1->v2:
- Rebase after bump to version 243--- package/systemd/systemd.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com