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 <adam.wujek@cern.ch>
parent fa182f2d
...@@ -13,8 +13,6 @@ if [ -n "$WRS_VERBOSE" ]; then ...@@ -13,8 +13,6 @@ if [ -n "$WRS_VERBOSE" ]; then
set -x set -x
fi fi
# will be changed later if successful
echo "hwinfo_error" > /tmp/hwinfo_read_status
# This kernel has no hwinfo partition (strange...) # This kernel has no hwinfo partition (strange...)
if ! grep -q hwinfo /proc/mtd; then if ! grep -q hwinfo /proc/mtd; then
...@@ -33,7 +31,11 @@ fi ...@@ -33,7 +31,11 @@ fi
echo "Creating SDB filesystem in /dev/mtd5" echo "Creating SDB filesystem in /dev/mtd5"
# So, we must create an sdb file, we need the template # 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
fi
# we need the eth addresses # we need the eth addresses
ethaddr=$(ifconfig eth0 | grep HWaddr | awk '{print $5}') 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