mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
48c1fdd046
This drops the shebang from all target files for /lib and /etc/uci-defaults folders, as these are sourced and the shebang is useless. While at it, fix the executable flag on a few of these files. This does not touch ar71xx, as this target is just used for backporting now and applying cosmetic changes would just complicate things. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
15 lines
456 B
Plaintext
15 lines
456 B
Plaintext
do_sysinfo_bcm47xx() {
|
|
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_bcm47xx
|