catch all special characters in replacement
This commit is contained in:
parent
7f66481a70
commit
be6a6f3746
@ -16,10 +16,10 @@ end
|
|||||||
|
|
||||||
uci:delete_all('babeld', 'interface')
|
uci:delete_all('babeld', 'interface')
|
||||||
|
|
||||||
pcall(function()
|
pcall( function()
|
||||||
for interface in io.lines(interfaces) do
|
for interface in io.lines(interfaces) do
|
||||||
int = string.gsub(interface,'[.-]','_')
|
local section = interface:gsub('[^%w_]','_')
|
||||||
uci:section('babeld', 'interface', 'interface_' .. int, { ifname = interface })
|
uci:section('babeld', 'interface', 'interface_' .. section, { ifname = interface })
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user