From: Lars Alex Pedersen <lapeddk@gmail.com>
To: ptxdist@pengutronix.de
Cc: Lars Alex Pedersen <lapeddk@gmail.com>
Subject: [ptxdist] [PATCH v2 2/2] rootfs: Add option for stub resolv when systemd-resolved is used
Date: Wed, 4 Mar 2026 13:34:35 +0100 [thread overview]
Message-ID: <20260304123435.1730190-2-lapeddk@gmail.com> (raw)
In-Reply-To: <20260304123435.1730190-1-lapeddk@gmail.com>
The stub-resolv.conf allows using the DNS cache functionality in
systemd-resolved.
Signed-off-by: Lars Alex Pedersen <lapeddk@gmail.com>
---
rules/rootfs.in | 12 +++++++++++-
rules/rootfs.make | 3 +++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/rules/rootfs.in b/rules/rootfs.in
index 93b53481d..9e8c8ff50 100644
--- a/rules/rootfs.in
+++ b/rules/rootfs.in
@@ -439,7 +439,7 @@ choice
config ROOTFS_RESOLV_SYSTEMD
bool
- depends on SYSTEMD_NETWORK
+ depends on SYSTEMD_RESOLVED
prompt "link to /run/systemd/resolve/resolv.conf"
help
If enabled, it installs /etc/resolv.conf as a link to
@@ -447,6 +447,16 @@ choice
systemd-resolved and is filled with data from the systemd
managed interfaces.
+ config ROOTFS_RESOLV_STUB_SYSTEMD
+ bool
+ depends on SYSTEMD_RESOLVED
+ prompt "link to /run/systemd/resolve/stub-resolv.conf"
+ help
+ If enabled, it installs /etc/resolv.conf as a link to
+ /run/systemd/resolve/stub-resolv.conf. This file is provided by
+ systemd-resolved and is filled with data from the systemd
+ managed interfaces.
+
config ROOTFS_RESOLV_STATIC
bool
depends on SYSTEMD_NETWORK
diff --git a/rules/rootfs.make b/rules/rootfs.make
index 656fbe4ba..b67b6526d 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -266,6 +266,9 @@ endif
ifdef PTXCONF_ROOTFS_RESOLV_SYSTEMD
@$(call install_link, rootfs, /run/systemd/resolve/resolv.conf, /etc/resolv.conf)
endif
+ifdef PTXCONF_ROOTFS_RESOLV_STUB_SYSTEMD
+ @$(call install_link, rootfs, /run/systemd/resolve/stub-resolv.conf, /etc/resolv.conf)
+endif
ifdef PTXCONF_ROOTFS_RESOLV_STATIC
@$(call install_link, rootfs, /usr/lib/systemd/resolv.conf, /etc/resolv.conf)
endif
--
2.53.0
prev parent reply other threads:[~2026-03-04 12:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 12:34 [ptxdist] [PATCH v2 1/2] systemd: Add separate option for systemd resolved Lars Alex Pedersen
2026-03-04 12:34 ` Lars Alex Pedersen [this message]
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=20260304123435.1730190-2-lapeddk@gmail.com \
--to=lapeddk@gmail.com \
--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