mirror of https://github.com/aredn/aredn.git
Extra bad olsr protection (#992)
* Better protection for missing olsrd files
This commit is contained in:
parent
da8ef31dd1
commit
6d15dfb869
|
@ -1 +1 @@
|
||||||
src-git arednpackages https://github.com/aredn/aredn_packages;develop
|
src-git arednpackages https://github.com/kn6plv/aredn_packages;working
|
||||||
|
|
|
@ -70,6 +70,7 @@ function do_namechange()
|
||||||
local subdomains = ""
|
local subdomains = ""
|
||||||
|
|
||||||
-- Load the hosts file
|
-- Load the hosts file
|
||||||
|
if nixio.fs.stat("/var/run/hosts_olsr.stable") then
|
||||||
for line in io.lines("/var/run/hosts_olsr.stable")
|
for line in io.lines("/var/run/hosts_olsr.stable")
|
||||||
do
|
do
|
||||||
local v = line:splitWhiteSpace()
|
local v = line:splitWhiteSpace()
|
||||||
|
@ -93,6 +94,7 @@ function do_namechange()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Find the current neighbors
|
-- Find the current neighbors
|
||||||
local raw = io.popen("/usr/bin/wget -O - http://127.0.0.1:9090/links 2> /dev/null")
|
local raw = io.popen("/usr/bin/wget -O - http://127.0.0.1:9090/links 2> /dev/null")
|
||||||
|
|
|
@ -312,6 +312,7 @@ end
|
||||||
-- discard
|
-- discard
|
||||||
routes = nil
|
routes = nil
|
||||||
|
|
||||||
|
if nixio.fs.stat("/var/run/services_olsr") then
|
||||||
for line in io.lines("/var/run/services_olsr")
|
for line in io.lines("/var/run/services_olsr")
|
||||||
do
|
do
|
||||||
if line:match("^%w") then
|
if line:match("^%w") then
|
||||||
|
@ -339,6 +340,7 @@ do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- load the node history
|
-- load the node history
|
||||||
if nixio.fs.stat("/tmp/node.history") then
|
if nixio.fs.stat("/tmp/node.history") then
|
||||||
|
|
Loading…
Reference in New Issue