mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Christoph Fritz <chf.fritz@googlemail.com>
To: Michael Olbrich <m.olbrich@pengutronix.de>
Cc: ptxdist@pengutronix.de,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: [ptxdist] [PATCH][v2] rootfs: add choice to link resolv.conf to /proc/net/pnp
Date: Mon, 17 Sep 2012 10:29:30 +0200	[thread overview]
Message-ID: <1347870570.3792.6.camel@mars> (raw)
In-Reply-To: <1347635326.3679.22.camel@mars>


Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
v2:
 -change PTXCONF_ROOTFS_RESOLV to
  PTXCONF_ROOTFS_RESOLV_FILE in rootfs.make too
---
 rules/rootfs.in   |   27 ++++++++++++++++++++++-----
 rules/rootfs.make |    5 ++++-
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/rules/rootfs.in b/rules/rootfs.in
index 350f0c2..3c3765d 100644
--- a/rules/rootfs.in
+++ b/rules/rootfs.in
@@ -390,12 +390,29 @@ config ROOTFS_PROTOCOLS
 	  If enabled, it installs the "./projectroot/etc/protocols" file if
 	  present, else a generic one from the ptxdist directory.
 
-config ROOTFS_RESOLV
-	bool
+choice
 	prompt "install /etc/resolv.conf"
-	help
-	  If enabled, it installs the "./projectroot/etc/resolv.conf" file if
-	  present, else a generic one from the ptxdist directory.
+	default ROOTFS_RESOLV_FILE
+
+	config ROOTFS_RESOLV_FILE
+		bool
+		prompt "as generic"
+		help
+		  If enabled, it installs the "./projectroot/etc/resolv.conf" file if
+		  present, else a generic one from the ptxdist directory.
+
+	config ROOTFS_RESOLV_LINK
+		bool
+		prompt "as link"
+		help
+		  If enabled, it installs /etc/resolv.conf as a link to /proc/net/pnp.
+
+	config ROOTFS_RESOLV_NONE
+		bool
+		prompt "not"
+		help
+		  If enabled, no /etc/resolv.conf will be install.
+endchoice
 
 config ROOTFS_SERVICES
 	bool
diff --git a/rules/rootfs.make b/rules/rootfs.make
index 8306c53..c60b840 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -215,7 +215,7 @@ endif
 ifdef PTXCONF_ROOTFS_PROTOCOLS
 	@$(call install_alternative, rootfs, 0, 0, 0644, /etc/protocols)
 endif
-ifdef PTXCONF_ROOTFS_RESOLV
+ifdef PTXCONF_ROOTFS_RESOLV_FILE
 	@$(call install_alternative, rootfs, 0, 0, 0644, /etc/resolv.conf)
 #	# replace either by PTXCONF_BOARDSETUP_GATEWAY or nothing if not defined
 ifneq ($(PTXCONF_BOARDSETUP_GATEWAY),)
@@ -226,6 +226,9 @@ else
 	@$(call install_replace, rootfs, /etc/resolv.conf, @NAMESERVER_LINE@, "")
 endif
 endif
+ifdef PTXCONF_ROOTFS_RESOLV_LINK
+	@$(call install_link, rootfs, /proc/net/pnp, /etc/resolv.conf)
+endif
 ifdef PTXCONF_ROOTFS_SERVICES
 	@$(call install_alternative, rootfs, 0, 0, 0644, /etc/services)
 endif
-- 
1.7.2.5




-- 
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2012-09-17  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 15:08 [ptxdist] [PATCH] " Christoph Fritz
2012-09-17  7:55 ` [ptxdist] Antwort: " Jan Weitzel
2012-09-17  8:29 ` Christoph Fritz [this message]
2012-09-21 12:52   ` [ptxdist] [PATCH][v2] " Michael Olbrich

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=1347870570.3792.6.camel@mars \
    --to=chf.fritz@googlemail.com \
    --cc=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=u.kleine-koenig@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