mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] rootfs: option to link /etc/resolv.conf to /lib/systemd/resolv.conf
@ 2017-03-20 14:34 Artur Wiebe
  2017-03-24 14:34 ` Michael Olbrich
  2017-04-12  8:59 ` Enrico Weigelt, metux IT consult
  0 siblings, 2 replies; 3+ messages in thread
From: Artur Wiebe @ 2017-03-20 14:34 UTC (permalink / raw)
  To: ptxdist; +Cc: Artur Wiebe

Signed-off-by: Artur Wiebe <artur@4wiebe.de>
---
 rules/rootfs.in    | 11 +++++++++++
 rules/rootfs.make  |  3 +++
 rules/systemd.make |  1 +
 3 files changed, 15 insertions(+)

diff --git a/rules/rootfs.in b/rules/rootfs.in
index 5965417e1..1b459b6d7 100644
--- a/rules/rootfs.in
+++ b/rules/rootfs.in
@@ -426,6 +426,17 @@ choice
 		  systemd-resolved and is filled with data from the systemd
 		  managed interfaces.
 
+	config ROOTFS_RESOLV_STATIC
+		bool
+		depends on SYSTEMD_NETWORK
+		prompt "link to /lib/systemd/resolv.conf"
+		help
+		  If enabled, it installs /etc/resolv.conf as a link to
+		  /lib/systemd/resolv.conf.
+		  This static file is provided by systemd that lists
+		  the 127.0.0.53 DNS stub as only DNS server.
+		  This mode of operation is recommended by systemd.
+
 	config ROOTFS_RESOLV_NONE
 		bool
 		prompt "none"
diff --git a/rules/rootfs.make b/rules/rootfs.make
index 08ae3a810..6c6c61e62 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -236,6 +236,9 @@ endif
 ifdef PTXCONF_ROOTFS_RESOLV_SYSTEMD
 	@$(call install_link, rootfs, /run/systemd/resolve/resolv.conf, /etc/resolv.conf)
 endif
+ifdef PTXCONF_ROOTFS_RESOLV_STATIC
+	@$(call install_link, rootfs, /lib/systemd/resolv.conf, /etc/resolv.conf)
+endif
 ifdef PTXCONF_ROOTFS_SERVICES
 	@$(call install_alternative, rootfs, 0, 0, 0644, /etc/services)
 endif
diff --git a/rules/systemd.make b/rules/systemd.make
index 001250d56..47f7198c6 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -296,6 +296,7 @@ ifdef PTXCONF_SYSTEMD_TIMEDATE
 endif
 ifdef PTXCONF_SYSTEMD_NETWORK
 	@$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-resolve)
+	@$(call install_copy, systemd, 0, 0, 0644, -, /lib/systemd/resolv.conf)
 	@$(call install_alternative, systemd, 0, 0, 0644, \
 		/etc/systemd/resolved.conf)
 endif
-- 
2.12.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-12  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20 14:34 [ptxdist] [PATCH] rootfs: option to link /etc/resolv.conf to /lib/systemd/resolv.conf Artur Wiebe
2017-03-24 14:34 ` Michael Olbrich
2017-04-12  8:59 ` Enrico Weigelt, metux IT consult

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox