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

* Re: [ptxdist] [PATCH] rootfs: option to link /etc/resolv.conf to /lib/systemd/resolv.conf
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2017-03-24 14:34 UTC (permalink / raw)
  To: ptxdist

On Mon, Mar 20, 2017 at 03:34:35PM +0100, Artur Wiebe wrote:
> Signed-off-by: Artur Wiebe <artur@4wiebe.de>

Thanks, applied,

Michael

> ---
>  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

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] rootfs: option to link /etc/resolv.conf to /lib/systemd/resolv.conf
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2017-04-12  8:59 UTC (permalink / raw)
  To: ptxdist

On 20.03.2017 15:34, Artur Wiebe wrote:
> 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

Misleading config item name.

Should clearly reflect the fact that it links to a file belonging to
one particular optional package. So, perhaps call it

   CONFIG_ROOTFS_RESOLV_SYSTEMD_STATIC

OTOH, as it's from only one of dozens optional packages that might
add/maintain local resolver config, I wonder why it's not handled
within that particular package (in that case: systemd). By the same
logic, we would also have to add similar options for all the various
dhcp clients of other network management tools within the rootfs
package. And the same for lots of other files in /etc.


--mtx


_______________________________________________
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