Skip to content
Snippets Groups Projects
Unverified Commit eef3bba1 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-client-bridge: use new gluon.site library to avoid 'or {}' syntax

parent 1d6e6726
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/lua
local client_bridge = require 'gluon.client_bridge'
local site = require 'gluon.site_config'
local site = require 'gluon.site'
local sysconfig = require 'gluon.sysconfig'
local uci = require('simple-uci').cursor()
local next_node = site.next_node or {}
local next_node = site.next_node({})
uci:delete('network', 'local_node_dev')
......@@ -23,7 +23,7 @@ uci:section('network', 'device', 'local_node_dev', {
local ip4, ip6
if next_node.ip4 then
local plen = site.prefix4:match('/%d+$')
local plen = site.prefix4():match('/%d+$')
ip4 = next_node.ip4 .. plen
end
......
local site = require 'gluon.site_config'
local site = require 'gluon.site'
module 'gluon.client_bridge'
function next_node_macaddr()
return (site.next_node or {}).mac or '16:41:95:40:f7:dc'
return site.next_node.mac('16:41:95:40:f7:dc')
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment