2014-09-12 13:00:14 -06:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
DHCPLANSECTION=`uci show dhcp|grep interface=lan|sed "s/dhcp.\@dhcp\[\(.*\)\].interface=lan/\1/"`
|
|
|
|
|
2014-09-12 13:03:16 -06:00
|
|
|
logger "BBHN Recovery: Reseting password to BBHN default"
|
2014-09-12 13:00:14 -06:00
|
|
|
/usr/local/bin/setpasswd hsmm
|
|
|
|
|
2014-09-15 17:56:41 -06:00
|
|
|
logger "BBHN Recovery: Restarting uhttpd"
|
|
|
|
/etc/init.d/uhttpd restart
|
|
|
|
|
2014-09-12 13:03:16 -06:00
|
|
|
if [ "$DHCPLANSECTION" != "" ]
|
|
|
|
then
|
|
|
|
logger "BBHN Recovery: Enable DHCP on lan interface"
|
|
|
|
uci set dhcp.@dhcp\[$DHCPLANSECTION\].ignore=0
|
|
|
|
uci -q commit
|
2014-09-12 13:00:14 -06:00
|
|
|
|
2014-09-12 13:03:16 -06:00
|
|
|
logger "BBHN Recovery: Restart dnsmasq"
|
|
|
|
/etc/init.d/dnsmasq restart
|
|
|
|
fi
|
2014-09-12 13:00:14 -06:00
|
|
|
|