gluon-mesh-batman-adv-core: don't print error message when no_rebroadcast is not supported

batman-adv 2017.0 doesn't need (or support) no_rebroadcast anymore. Don't
fail when the file doesn't exist.
This commit is contained in:
Matthias Schiffer 2017-04-10 01:32:30 +02:00
parent 9e487f3104
commit 6499658b52
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
1 changed files with 5 additions and 3 deletions

View File

@ -38,9 +38,11 @@ if cmd == 'setup' then
file:write('bat0')
file:close()
file = assert(io.open('/sys/class/net/' .. ifname .. '/batman_adv/no_rebroadcast', 'w'))
file:write(tostring(transitive))
file:close()
file = io.open('/sys/class/net/' .. ifname .. '/batman_adv/no_rebroadcast', 'w')
if file then
file:write(tostring(transitive))
file:close()
end
elseif cmd == 'teardown' then