mirror of https://github.com/aredn/aredn.git
bugfix: CPE510: Network activity led's broke after config save
Save the port mapping for link_lan led's for use in the system file so that the link led's will work after save and reboot
This commit is contained in:
parent
b6805ca15f
commit
e7c3cdc909
|
@ -15,3 +15,4 @@ config button
|
|||
option min '12'
|
||||
option max '20'
|
||||
|
||||
include /etc/aredn_include/system_netled
|
||||
|
|
|
@ -15,3 +15,4 @@ config button
|
|||
option min '12'
|
||||
option max '20'
|
||||
|
||||
include /etc/aredn_include/system_netled
|
||||
|
|
|
@ -15,3 +15,4 @@ config button
|
|||
option min '12'
|
||||
option max '20'
|
||||
|
||||
include /etc/aredn_include/system_netled
|
||||
|
|
|
@ -15,3 +15,4 @@ config button
|
|||
option min '12'
|
||||
option max '20'
|
||||
|
||||
include /etc/aredn_include/system_netled
|
||||
|
|
|
@ -15,3 +15,4 @@ config button
|
|||
option min '12'
|
||||
option max '20'
|
||||
|
||||
include /etc/aredn_include/system_netled
|
||||
|
|
|
@ -87,6 +87,33 @@ boot() {
|
|||
|
||||
fi
|
||||
|
||||
|
||||
# Save system NET LED settings
|
||||
if [ ! -f /etc/aredn_include/system_netled]
|
||||
then
|
||||
mkdir -p /etc/aredn_include
|
||||
touch /etc/aredn_include/system_netled
|
||||
i=0
|
||||
while true; do
|
||||
uci -q get system.led_lan$i > /dev/null
|
||||
local status=$?
|
||||
if [ $status == 1 ]
|
||||
then
|
||||
break
|
||||
fi
|
||||
echo "config led 'led_lan$i'" >> /etc/aredn_include/system_netled
|
||||
echo " option name '`uci -q get system.led_lan$i.name`'" >> /etc/aredn_include/system_netled
|
||||
echo " option sysfs '`uci -q get system.led_lan$i.sysfs`'" >> /etc/aredn_include/system_netled
|
||||
echo " option trigger '`uci -q get system.led_lan$i.trigger`'" >> /etc/aredn_include/system_netled
|
||||
echo " option port_mask '`uci -q get system.led_lan$i.name`'" >> /etc/aredn_include/system_netled
|
||||
echo "" >> /etc/aredn_include/system_netled
|
||||
let i++
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# setup nvram variables
|
||||
[ -x /usr/local/bin/nvram-setup ] && /usr/local/bin/nvram-setup
|
||||
|
||||
|
|
Loading…
Reference in New Issue