diff options
-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 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 |