aredn/files/usr/local/bin/get_hardware_mfg

23 lines
316 B
Bash
Executable File

#!/bin/sh
# Return the hardware mfg of the device
SYSINFO=/tmp/sysinfo/hardware_mfg
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 name
echo "${name%% *}" > $SYSINFO
fi
cat $SYSINFO