summaryrefslogtreecommitdiff
path: root/meta/recipes-core/initrdscripts/files
diff options
context:
space:
mode:
authorDrew Moseley <drew_moseley@mentor.com>2014-07-06 20:43:00 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-10 17:37:38 +0100
commit1d73e3f9d9977382efdb0c111c556c6048bd60b4 (patch)
tree11c36ccdb813a3cf46f4fd64d9358ae5cf06e0f2 /meta/recipes-core/initrdscripts/files
parentcdbe55215e3dd1b82a6c147a31c7c40186a8bf80 (diff)
downloadopenembedded-core-1d73e3f9d9977382efdb0c111c556c6048bd60b4.tar.gz
openembedded-core-1d73e3f9d9977382efdb0c111c556c6048bd60b4.tar.bz2
openembedded-core-1d73e3f9d9977382efdb0c111c556c6048bd60b4.zip
init-install.sh: Verify /sys based files exist before displaying them
Some mmc cards do not have all the data files in /sys/block populated. Check for existence before displaying the files to avoid erroring out of the install process. Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/initrdscripts/files')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 0a1141a6f5..486c9f2635 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -46,9 +46,14 @@ for hdname in $hdnamelist; do
echo -n "VENDOR="
cat /sys/block/$hdname/device/vendor
fi
- echo -n "MODEL="
- cat /sys/block/$hdname/device/model
- cat /sys/block/$hdname/device/uevent
+ if [ -r /sys/block/$hdname/device/model ]; then
+ echo -n "MODEL="
+ cat /sys/block/$hdname/device/model
+ fi
+ if [ -r /sys/block/$hdname/device/uevent ]; then
+ echo -n "UEVENT="
+ cat /sys/block/$hdname/device/uevent
+ fi
echo
# Get user choice
while true; do