summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-12-21 16:43:40 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2010-12-21 16:43:40 +0100
commit4d7bef86e2db265358a230af60d8076059dddff8 (patch)
tree4aaa8708877d0e46ea43625a7495b0e79b2aef66 /defaultenv
parent31a43f8e23f2139bfb9d09441e3633c74b9e11bf (diff)
downloadbarebox-4d7bef86e2db265358a230af60d8076059dddff8.tar.gz
defaultenv: only try to add partitions when partition description exists
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/bin/init6
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