summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew Moseley <drew_moseley@mentor.com>2014-07-30 20:49:30 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-02 09:25:34 +0100
commit4abe5563f61a228963e1e442ebc2df9f2d01be80 (patch)
tree5deae6153e0013b939088e4fc50e1567684f5fcd
parentb2ecf4065fa5930b896b8790d153389e400eb0ec (diff)
downloadopenembedded-core-contrib-4abe5563f61a228963e1e442ebc2df9f2d01be80.tar.gz
openembedded-core-contrib-4abe5563f61a228963e1e442ebc2df9f2d01be80.tar.bz2
openembedded-core-contrib-4abe5563f61a228963e1e442ebc2df9f2d01be80.zip
init-install-efi.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>
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index fcf21cd2f9..b142ed4915 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -47,9 +47,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