27 lines
433 B
Lua
Executable File
27 lines
433 B
Lua
Executable File
#!/usr/bin/lua
|
|
|
|
local sysconfig = require 'gluon.sysconfig'
|
|
local uci = require('luci.model.uci').cursor()
|
|
|
|
|
|
local ifname
|
|
|
|
if sysconfig.lan_ifname then
|
|
ifname = sysconfig.lan_ifname .. ' bat0'
|
|
else
|
|
ifname = 'bat0'
|
|
end
|
|
|
|
|
|
uci:section('network', 'interface', 'client',
|
|
{
|
|
ifname = ifname,
|
|
type = 'bridge',
|
|
proto = 'dhcpv6',
|
|
reqprefix = 'no',
|
|
}
|
|
)
|
|
|
|
uci:save('network')
|
|
uci:commit('network')
|