8a2de67bc55603035e44f26bb397c43f79814acf
[openwrt/openwrt.git] / target / linux / brcm47xx / base-files / lib / preinit / 01_sysinfo
1 #!/bin/sh
2
3 do_sysinfo_brcm47xx() {
4 local name="$(sed -ne 's/^machine[ \t]*: //p' /proc/cpuinfo)"
5 [ -z "$name" ] && name="unknown"
6
7 [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
8 echo "$name" > /tmp/sysinfo/board_name
9 echo "unknown" > /tmp/sysinfo/model
10 }
11
12 boot_hook_add preinit_main do_sysinfo_brcm47xx