Commit 3f598d11 authored by Adam Wujek's avatar Adam Wujek 💬

rootfs: don't write error for hwinfo when result is not known

Before at the beginnig of the hwinfo script, hwinfo_error was written to the status file.
Then if there was success or warning then update was written to status file.
Snmpd could read error even there was no error.
Signed-off-by: Adam Wujek's avatarAdam Wujek <>
parent fa182f2d
......@@ -13,8 +13,6 @@ if [ -n "$WRS_VERBOSE" ]; then
set -x
# will be changed later if successful
echo "hwinfo_error" > /tmp/hwinfo_read_status
# This kernel has no hwinfo partition (strange...)
if ! grep -q hwinfo /proc/mtd; then
......@@ -33,7 +31,11 @@ fi
echo "Creating SDB filesystem in /dev/mtd5"
# So, we must create an sdb file, we need the template
cp /wr/etc/sdb-for-dataflash /tmp || exit 1
cp /wr/etc/sdb-for-dataflash /tmp
if [ $? -ne 0 ] ; then
echo "hwinfo_error" > /tmp/hwinfo_read_status
exit 1
# we need the eth addresses
ethaddr=$(ifconfig eth0 | grep HWaddr | awk '{print $5}')
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