aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
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:38:32 +0100
commit7b861d0eeb12c7f834ef0fb05e9602e3e54236af (patch)
tree023d4730cc8ec3424a540a7dd7f614ed0d7a1df5 /meta/recipes-core
parent949bf156ca95153485c41698de4b4dd661b0f6dd (diff)
downloadopenembedded-core-contrib-7b861d0eeb12c7f834ef0fb05e9602e3e54236af.tar.gz
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. (From OE-Core rev: 1d73e3f9d9977382efdb0c111c556c6048bd60b4) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-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