#!/bin/sh
# Return the hardware type of the device

SYSINFO=/tmp/sysinfo/hardware_type

if [ ! -f $SYSINFO ]; then
CFG=/etc/board.json
name=""

. /usr/share/libubox/jshn.sh

[ -f $CFG ] || exit 1
json_init
json_load "$(cat ${CFG})"
json_select model
json_get_vars id

echo "${id##*,}" > $SYSINFO

fi

cat $SYSINFO
