forked from freifunk-franken/firmware
Fixed unwanted reboot every 5 Minutes after -n flash
The error only occurs if there isn't any network connection. Fixes #23 Also added prevention for applying empty coordinates. Signed-off-by: Jan Kraus <mayosemmel@gmail.com> Reviewed-by: Tobias Klaus <tk+ff@meskal.net> Reviewed-by: Tim Niemeyer <tim@tn-x.org>
This commit is contained in:
parent
303ddf3ce9
commit
74bc7e7949
|
@ -26,6 +26,9 @@ xml_data=$( wget -q -O - "http://fe80::ff:feee:1%br-mesh/api/rest/api.php?rquest
|
|||
if [ -z "$xml_data" ]; then
|
||||
echo "xml_data is not set"
|
||||
exit 1
|
||||
elif echo "$xml_data"|grep "can't connect to remote host" ;then
|
||||
echo "The Netmon Server can't be reached."
|
||||
exit 1
|
||||
elif echo "$xml_data"|grep "HTTP/1.1 404 Not Found" ;then
|
||||
echo "This Router is not present in the Netmon Database."
|
||||
delete_myself
|
||||
|
@ -45,6 +48,9 @@ if [ "$latitude" -eq 0 ] && [ "$longitude" -eq 0 ]; then
|
|||
echo "Unable to retrieve coordinates from Netmon."
|
||||
echo "Maybe the coordinates are suppressed."
|
||||
delete_myself
|
||||
elif [ -z "$latitude" ] || [ -z "$longitude" ]; then
|
||||
echo "No coordinates, looks like an error"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
uci set system.@system[0]=system
|
||||
|
|
Loading…
Reference in New Issue