1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

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>
This commit is contained in:
Drew Moseley
2014-07-06 20:43:00 -04:00
committed by Richard Purdie
parent 949bf156ca
commit 7b861d0eeb
@@ -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