1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
svn-openwrt-archive/target/linux/octeon/base-files/lib/preinit/20_sysinfo
Felix Fietkau beda11255b octeon: get rid of /lib/functions/octeon.sh hackery, use sysinfo directly
Fixes sysupgrade

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48558
2016-01-29 23:19:41 +00:00

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