gluon-simple-tc: change type of the enabled option in the site config to boolean
This commit is contained in:
parent
ce37755488
commit
de633e9bc3
@ -7,9 +7,16 @@ local c = uci.cursor()
|
||||
|
||||
|
||||
for name, config in pairs(site.simple_tc) do
|
||||
if not c:get('gluon-simple-tc', name) then
|
||||
c:section('gluon-simple-tc', 'interface', name, config)
|
||||
end
|
||||
if not c:get('gluon-simple-tc', name) then
|
||||
c:section('gluon-simple-tc', 'interface', name,
|
||||
{
|
||||
ifname = config.ifname,
|
||||
enabled = config.enabled and 1 or 0,
|
||||
limit_egress = config.limit_egress,
|
||||
limit_ingress = config.limit_ingress,
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
c:save('gluon-simple-tc')
|
||||
|
Loading…
Reference in New Issue
Block a user