beda11255b
Fixes sysupgrade Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48558
32 lines
472 B
Plaintext
32 lines
472 B
Plaintext
do_sysinfo_octeon() {
|
|
local machine
|
|
local name
|
|
|
|
machine=$(grep "^system type" /proc/cpuinfo | sed "s/system type.*: \(.*\)/\1/g")
|
|
|
|
case "$machine" in
|
|
"UBNT_E100"*)
|
|
name="erlite"
|
|
;;
|
|
|
|
"UBNT_E200"*)
|
|
name="er"
|
|
;;
|
|
|
|
"UBNT_E220"*)
|
|
name="erpro"
|
|
;;
|
|
|
|
*)
|
|
name="generic"
|
|
;;
|
|
esac
|
|
|
|
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
|
|
|
|
echo "$name" > /tmp/sysinfo/board_name
|
|
echo "$machine" > /tmp/sysinfo/model
|
|
}
|
|
|
|
boot_hook_add preinit_main do_sysinfo_octeon
|