mirror of https://github.com/aredn/aredn.git
bugfix: CPE510: networking does not function after initial config save
After saving the config the lack of the root level switch entry which enables vlans and resets the switch causes the network to shutdown.
This commit is contained in:
parent
3c07872f06
commit
6e74aaf0f4
|
@ -12,6 +12,22 @@ boot() {
|
|||
then
|
||||
mkdir -p /etc/aredn_include
|
||||
touch /etc/aredn_include/swconfig
|
||||
i=0
|
||||
while true; do
|
||||
uci -q get network.\@switch\[$i\] > /dev/null
|
||||
local status=$?
|
||||
if [ $status == 1 ]
|
||||
then
|
||||
break
|
||||
fi
|
||||
echo "config switch" >> /etc/aredn_include/swconfig
|
||||
echo " option name '`uci -q get network.\@switch\[$i\].name`'" >> /etc/aredn_include/swconfig
|
||||
echo " option reset '`uci -q get network.\@switch\[$i\].reset`'" >> /etc/aredn_include/swconfig
|
||||
echo " option enable_vlan '`uci -q get network.\@switch\[$i\].enable_vlan`'" >> /etc/aredn_include/swconfig
|
||||
echo "" >> /etc/aredn_include/swconfig
|
||||
let i++
|
||||
done
|
||||
|
||||
i=0
|
||||
while true; do
|
||||
uci -q get network.\@switch_vlan\[$i\] > /dev/null
|
||||
|
|
Loading…
Reference in New Issue