diff options
author | Drew Moseley <drew_moseley@mentor.com> | 2014-07-06 20:43:00 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-10 17:38:32 +0100 |
commit | 7b861d0eeb12c7f834ef0fb05e9602e3e54236af (patch) | |
tree | 023d4730cc8ec3424a540a7dd7f614ed0d7a1df5 /meta/recipes-core | |
parent | 949bf156ca95153485c41698de4b4dd661b0f6dd (diff) | |
download | poky-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.sh | 11 |
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 | |||
46 | echo -n "VENDOR=" | 46 | echo -n "VENDOR=" |
47 | cat /sys/block/$hdname/device/vendor | 47 | cat /sys/block/$hdname/device/vendor |
48 | fi | 48 | fi |
49 | echo -n "MODEL=" | 49 | if [ -r /sys/block/$hdname/device/model ]; then |
50 | cat /sys/block/$hdname/device/model | 50 | echo -n "MODEL=" |
51 | cat /sys/block/$hdname/device/uevent | 51 | cat /sys/block/$hdname/device/model |
52 | fi | ||
53 | if [ -r /sys/block/$hdname/device/uevent ]; then | ||
54 | echo -n "UEVENT=" | ||
55 | cat /sys/block/$hdname/device/uevent | ||
56 | fi | ||
52 | echo | 57 | echo |
53 | # Get user choice | 58 | # Get user choice |
54 | while true; do | 59 | while true; do |