mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] defaultenv: only try to add partitions when partition description exists
Date: Thu, 20 Jan 2011 09:47:51 +0100	[thread overview]
Message-ID: <1295513272-22108-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1295513272-22108-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 defaultenv/bin/init |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/defaultenv/bin/init b/defaultenv/bin/init
index 96a5716..877b541 100644
--- a/defaultenv/bin/init
+++ b/defaultenv/bin/init
@@ -4,15 +4,15 @@ PATH=/env/bin
 export PATH
 
 . /env/config
-if [ -e /dev/nor0 ]; then
+if [ -e /dev/nor0 -a -n "$nor_parts" ]; then
 	addpart /dev/nor0 $nor_parts
 fi
 
-if [ -e /dev/disk0 ]; then
+if [ -e /dev/disk0 -a -n "$disk_parts" ]; then
 	addpart /dev/disk0 $disk_parts
 fi
 
-if [ -e /dev/nand0 ]; then
+if [ -e /dev/nand0 -a -n "$nand_parts" ]; then
 	addpart /dev/nand0 $nand_parts
 
 	# Uh, oh, hush first expands wildcards and then starts executing
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-01-20  8:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20  8:47 Default environment patches Sascha Hauer
2011-01-20  8:47 ` Sascha Hauer [this message]
2011-01-20  8:47 ` [PATCH 2/2] defaultenv: do not print usage information for update script Sascha Hauer
2011-01-20  8:57   ` Eric Bénard
2011-01-20 15:25   ` Jean-Christophe PLAGNIOL-VILLARD
2011-01-20 15:37     ` Eric Bénard

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=1295513272-22108-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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