Skip to content

Commit

Permalink
[autoname] Handle all types of anonymous switch sections
Browse files Browse the repository at this point in the history
  • Loading branch information
okraits committed Sep 18, 2018
1 parent feb683d commit 597bd60
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openwisp-config/files/sbin/openwisp-uci-autoname.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ for file in lfs.dir(standard_path) do
elseif file == 'network' and (section['.type'] == 'route' or section['.type'] == 'route6') then
incCount('route')
section['.name'] = 'route' .. getCount('route')
elseif file == 'network' and section['.type'] == 'switch' then
section['.name'] = section['name']
elseif file == 'network' and section['.type'] == 'switch_vlan' then
section['.name'] = section['device'] .. '_vlan' .. section['vlan']
elseif file == 'network' and section['.type'] == 'switch_port' then
section['.name'] = section['device'] .. '_port' .. section['port']
elseif file == 'system' and section['.type'] == 'system' then
section['.name'] = 'system'
elseif file == 'system' and section['.type'] == 'led' then
Expand Down

0 comments on commit 597bd60

Please sign in to comment.