2018-05-13 22:02:57 -06:00
|
|
|
#!/bin/sh
|
2020-01-22 18:37:27 -07:00
|
|
|
# Return the hardware mfg of the device
|
2018-05-13 22:02:57 -06:00
|
|
|
|
2020-01-22 18:37:27 -07:00
|
|
|
SYSINFO=/tmp/sysinfo/hardware_mfg
|
|
|
|
|
|
|
|
if [ ! -f $SYSINFO ]; then
|
2018-05-13 22:02:57 -06:00
|
|
|
CFG=/etc/board.json
|
2018-09-17 22:31:14 -06:00
|
|
|
name=""
|
2018-05-13 22:02:57 -06:00
|
|
|
|
|
|
|
. /usr/share/libubox/jshn.sh
|
|
|
|
|
|
|
|
[ -f $CFG ] || exit 1
|
|
|
|
json_init
|
|
|
|
json_load "$(cat ${CFG})"
|
|
|
|
json_select model
|
|
|
|
json_get_vars name
|
2020-01-22 18:37:27 -07:00
|
|
|
|
|
|
|
echo "${name%% *}" > $SYSINFO
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat $SYSINFO
|