You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
469 B

#!/bin/sh
do_sysinfo_brcm47xx() {
local boardtype="$(nvram get boardtype)"
local boardnum="$(nvram get boardnum)"
local model="$(sed -ne 's/^machine[ \t]*: //p' /proc/cpuinfo)"
[ -z "$model" ] && model="unknown"
[ -z "$boardtype" ] && boardtype="unknown"
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
echo "$boardtype${boardnum:+:$boardnum}" > /tmp/sysinfo/board_name
echo "$model" > /tmp/sysinfo/model
}
boot_hook_add preinit_main do_sysinfo_brcm47xx