Switch LAN and WAN port of Ubiquiti AirGateway

This makes the LAN port the PoE master, so the AirGateway can be used to
supply power to another node connected via mesh-on-LAN.

Fixes #608
This commit is contained in:
Matthias Schiffer 2017-02-23 19:49:39 +01:00
parent f0b919e89c
commit b45585a109
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
2 changed files with 16 additions and 7 deletions

View File

@ -34,6 +34,7 @@ if platform.match('ar71xx', 'generic', {
'cpe510',
'wbs210',
'wbs510',
'airgateway',
'nanostation-m',
'nanostation-m-xw',
'unifi-outdoor-plus',

View File

@ -5,16 +5,24 @@ local sysconfig = require 'gluon.sysconfig'
if sysconfig.setup_ifname then
os.exit(0)
os.exit(0)
end
if
platform.match('ar71xx', 'generic', {'cpe210', 'cpe510', 'wbs210', 'wbs510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus', 'uap-pro', 'unifiac-pro'}) or
platform.match('ar71xx', 'mikrotik')
then
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.wan_ifname or sysconfig.lan_ifname
if platform.match('ar71xx', 'generic', {
'cpe210',
'cpe510',
'wbs210',
'wbs510',
'airgateway',
'nanostation-m',
'nanostation-m-xw',
'unifi-outdoor-plus',
'uap-pro',
'unifiac-pro'
}) or platform.match('ar71xx', 'mikrotik') then
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.wan_ifname or sysconfig.lan_ifname
else
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.lan_ifname or sysconfig.wan_ifname
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.lan_ifname or sysconfig.wan_ifname
end
-- Remove the old sysconfig setting