mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Artur Wiebe <artur@4wiebe.de>
To: ptxdist@pengutronix.de
Cc: Artur Wiebe <artur@4wiebe.de>
Subject: [ptxdist] [PATCH] rootfs: option to link /etc/resolv.conf to /lib/systemd/resolv.conf
Date: Mon, 20 Mar 2017 15:34:35 +0100	[thread overview]
Message-ID: <20170320143435.8793-1-artur@4wiebe.de> (raw)

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

             reply	other threads:[~2017-03-20 14:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 14:34 Artur Wiebe [this message]
2017-03-24 14:34 ` Michael Olbrich
2017-04-12  8:59 ` Enrico Weigelt, metux IT consult

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170320143435.8793-1-artur@4wiebe.de \
    --to=artur@4wiebe.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox