Commit 8ec67be0 authored by Adam Wujek's avatar Adam Wujek 💬

rootfs/etc/init.d/hwinfo: check presence of sdb-read before calling it

If the build or image is broken and sdb-read is missing don't try to
overwrite hwinfo
Signed-off-by: Adam Wujek's avatarAdam Wujek <>
parent 9c54fad8
......@@ -21,6 +21,14 @@ if ! grep -q hwinfo /proc/mtd; then
exit 0;
if ! [ -f /wr/bin/sdb-read ]; then
# If for some reason sdb-read is not available, don't touch hwinfo
echo "/wr/bin/sdb-read not available!"
# save script result for snmp
echo "hwinfo_error" > /tmp/hwinfo_read_status
exit 0;
# Is there sdb in there? If so, nothing to do.
if /wr/bin/sdb-read /dev/mtd5ro > /dev/null; then
# save script result for snmp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment