mirror of https://github.com/aredn/aredn.git
feature: Use reset button to make field recovery easier.
Cleaner version with the config files included in the commit.
This commit is contained in:
parent
2e0b2cbd90
commit
a9ed10de33
|
@ -1,3 +1,17 @@
|
||||||
config 'system'
|
config 'system'
|
||||||
option 'hostname' '<NODE>'
|
option 'hostname' '<NODE>'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler '/usr/local/bin/bbhnrecoverymode'
|
||||||
|
option min '3'
|
||||||
|
option max '7'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler 'firstboot && reboot'
|
||||||
|
option min '8'
|
||||||
|
option max '12'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
config 'system'
|
config 'system'
|
||||||
option 'hostname' '<NODE>'
|
option 'hostname' '<NODE>'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler '/usr/local/bin/bbhnrecoverymode'
|
||||||
|
option min '3'
|
||||||
|
option max '7'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler 'firstboot && reboot'
|
||||||
|
option min '8'
|
||||||
|
option max '12'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
config 'system'
|
config 'system'
|
||||||
option 'hostname' '<NODE>'
|
option 'hostname' '<NODE>'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler '/usr/local/bin/bbhnrecoverymode'
|
||||||
|
option min '3'
|
||||||
|
option max '7'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler 'firstboot && reboot'
|
||||||
|
option min '8'
|
||||||
|
option max '12'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
config 'system'
|
config 'system'
|
||||||
option 'hostname' '<NODE>'
|
option 'hostname' '<NODE>'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler '/usr/local/bin/bbhnrecoverymode'
|
||||||
|
option min '3'
|
||||||
|
option max '7'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler 'firstboot && reboot'
|
||||||
|
option min '8'
|
||||||
|
option max '12'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
config 'system'
|
config 'system'
|
||||||
option 'hostname' '<NODE>'
|
option 'hostname' '<NODE>'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler '/usr/local/bin/bbhnrecoverymode'
|
||||||
|
option min '3'
|
||||||
|
option max '7'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler 'firstboot && reboot'
|
||||||
|
option min '8'
|
||||||
|
option max '12'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
config 'system'
|
config 'system'
|
||||||
option 'hostname' 'NOCALL'
|
option 'hostname' 'NOCALL'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler '/usr/local/bin/bbhnrecoverymode'
|
||||||
|
option min '3'
|
||||||
|
option max '7'
|
||||||
|
|
||||||
|
config button
|
||||||
|
option button 'reset'
|
||||||
|
option action 'released'
|
||||||
|
option handler 'firstboot && reboot'
|
||||||
|
option min '8'
|
||||||
|
option max '12'
|
||||||
|
|
|
@ -2,14 +2,16 @@
|
||||||
|
|
||||||
DHCPLANSECTION=`uci show dhcp|grep interface=lan|sed "s/dhcp.\@dhcp\[\(.*\)\].interface=lan/\1/"`
|
DHCPLANSECTION=`uci show dhcp|grep interface=lan|sed "s/dhcp.\@dhcp\[\(.*\)\].interface=lan/\1/"`
|
||||||
|
|
||||||
logger "Reseting password to factory default"
|
logger "BBHN Recovery: Reseting password to BBHN default"
|
||||||
/usr/local/bin/setpasswd hsmm
|
/usr/local/bin/setpasswd hsmm
|
||||||
|
|
||||||
logger "Enable DHCP on lan interface"
|
if [ "$DHCPLANSECTION" != "" ]
|
||||||
uci set dhcp.@dhcp\[$DHCPLANSECTION\].ignore=0
|
then
|
||||||
uci -q commit
|
logger "BBHN Recovery: Enable DHCP on lan interface"
|
||||||
|
uci set dhcp.@dhcp\[$DHCPLANSECTION\].ignore=0
|
||||||
logger "Restart dnsmasq"
|
uci -q commit
|
||||||
/etc/init.d/dnsmasq restart
|
|
||||||
|
|
||||||
|
logger "BBHN Recovery: Restart dnsmasq"
|
||||||
|
/etc/init.d/dnsmasq restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue