display ar71xx cpu clock Mhz in luci

This commit is contained in:
coolsnowwolf 2018-06-10 16:28:56 +08:00
parent ad21a419df
commit 9ae8d6f973

View File

@ -0,0 +1,15 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2017 lean <coolsnowwolf@gmail.com>
START=99
start()
{
a=$(cat /tmp/sysinfo/model)
b=$(dmesg | awk -F 'CPU:|MHz' '/Clocks:/{print $2+0}')
c=${a}" CPU:"${b}Mhz
echo -n $c > /tmp/sysinfo/model
}