2014-09-12 13:00:14 -06:00
|
|
|
#!/bin/sh
|
2015-01-18 12:36:49 -07:00
|
|
|
<<'LICENSE'
|
2015-03-09 17:39:04 -06:00
|
|
|
Part of AREDN -- Used for creating Amateur Radio Emergency Data Networks
|
2015-01-18 12:36:49 -07:00
|
|
|
Copyright (C) 2015 Conrad Lara
|
|
|
|
See Contributors file for additional contributors
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation version 3 of the License.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
LICENSE
|
2014-09-12 13:00:14 -06:00
|
|
|
|
2016-06-16 18:32:29 -06:00
|
|
|
DHCPLANSECTION=$(uci show dhcp|grep interface=lan|sed "s/dhcp.\@dhcp\[\(.*\)\].interface=lan/\1/")
|
2014-09-12 13:00:14 -06:00
|
|
|
|
2015-03-09 17:39:04 -06:00
|
|
|
logger "AREDN(TM) Recovery: Reseting root password to: hsmm"
|
2014-09-12 13:00:14 -06:00
|
|
|
/usr/local/bin/setpasswd hsmm
|
|
|
|
|
2015-03-09 17:39:04 -06:00
|
|
|
logger "AREDN(TM) Recovery: Restarting uhttpd"
|
2014-09-15 17:56:41 -06:00
|
|
|
/etc/init.d/uhttpd restart
|
|
|
|
|
2014-09-12 13:03:16 -06:00
|
|
|
if [ "$DHCPLANSECTION" != "" ]
|
|
|
|
then
|
2015-03-09 17:39:04 -06:00
|
|
|
logger "AREDN(TM) Recovery: Enable DHCP on lan interface"
|
2016-06-16 18:32:29 -06:00
|
|
|
uci set "dhcp.@dhcp\[$DHCPLANSECTION\].ignore=0"
|
2014-09-12 13:03:16 -06:00
|
|
|
uci -q commit
|
2014-09-12 13:00:14 -06:00
|
|
|
|
2015-03-09 17:39:04 -06:00
|
|
|
logger "AREDN(TM) Recovery: Restart dnsmasq"
|
2014-09-12 13:03:16 -06:00
|
|
|
/etc/init.d/dnsmasq restart
|
|
|
|
fi
|
2014-09-12 13:00:14 -06:00
|
|
|
|