summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Wiebe <artur@4wiebe.de>2017-03-20 15:34:35 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-03-24 15:06:30 +0100
commit7042f09587f435ead777efe4b79076be062f5089 (patch)
treea5ed0b910db6429c8e402a8046063d67e7e59e0a
parent001a500ed937de18e1e5448e213668f38cbd61f1 (diff)
downloadptxdist-7042f09587f435ead777efe4b79076be062f5089.tar.gz
ptxdist-7042f09587f435ead777efe4b79076be062f5089.tar.xz
rootfs: option to link /etc/resolv.conf to /lib/systemd/resolv.conf
Signed-off-by: Artur Wiebe <artur@4wiebe.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/rootfs.in11
-rw-r--r--rules/rootfs.make3
-rw-r--r--rules/systemd.make1
3 files changed, 15 insertions, 0 deletions
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 e3b05ef51..6b49e9710 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -336,6 +336,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