feature: Use reset button to make field recovery easier.

Cleaner version with the config files included in the commit.
This commit is contained in:
Conrad Lara - KG6JEI 2014-09-12 12:03:16 -07:00
parent 2e0b2cbd90
commit a9ed10de33
7 changed files with 92 additions and 7 deletions

View File

@ -1,3 +1,17 @@
config 'system'
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'

View File

@ -1,3 +1,17 @@
config 'system'
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'

View File

@ -1,3 +1,17 @@
config 'system'
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'

View File

@ -1,3 +1,17 @@
config 'system'
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'

View File

@ -1,3 +1,17 @@
config 'system'
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'

View File

@ -1,3 +1,16 @@
config 'system'
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'

View File

@ -2,14 +2,16 @@
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
logger "Enable DHCP on lan interface"
if [ "$DHCPLANSECTION" != "" ]
then
logger "BBHN Recovery: Enable DHCP on lan interface"
uci set dhcp.@dhcp\[$DHCPLANSECTION\].ignore=0
uci -q commit
logger "Restart dnsmasq"
logger "BBHN Recovery: Restart dnsmasq"
/etc/init.d/dnsmasq restart
fi