gluon-simple-tc: change type of the enabled option in the site config to boolean

This commit is contained in:
Matthias Schiffer 2014-07-16 16:56:15 +02:00
parent d4207d423e
commit bd4e26f12f
1 changed files with 10 additions and 3 deletions

View File

@ -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')