mirror of https://github.com/aredn/aredn.git
If address ping fails, also try an arping in case local device blocks pings
This commit is contained in:
parent
e591ffa801
commit
d16e9e4f90
|
@ -152,6 +152,7 @@ end
|
|||
|
||||
-- validation
|
||||
if validate then
|
||||
local laniface = aredn.hardware.get_iface_name("lan")
|
||||
local valid_hosts = {}
|
||||
-- Add in local names so services checks pass
|
||||
for _, name in ipairs(names)
|
||||
|
@ -163,6 +164,8 @@ if validate then
|
|||
do
|
||||
if os.execute("/bin/ping -q -c 1 -W 1 " .. host.ip .. " > /dev/null 2>&1") == 0 then
|
||||
valid_hosts[host.host:lower()] = host
|
||||
elseif os.execute("/usr/sbin/arping -q -f -c 1 -w 1 -I " .. laniface .. " " .. host.ip .. " > /dev/null 2>&1") == 0 then
|
||||
valid_hosts[host.host:lower()] = host
|
||||
end
|
||||
end
|
||||
-- Check all the services have a valid host
|
||||
|
|
Loading…
Reference in New Issue