From e9687d7ef1bac7fec410b276a20465344150facf Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 7 May 2020 00:33:36 +0200 Subject: [PATCH] gluon-setup-mode: use is_outdoor_device() for setup_ifname selection On PoE-powered devices, we usually want to use WAN for the setup mode. As all outdoor devices are PoE-powered, we can reuse this function. This switches the setup mode interface for new installations / after config reset on a few devices that were missing in this list before. --- .../luasrc/lib/gluon/upgrade/320-setup-ifname | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname b/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname index 7f0ca7b8..c4ef517c 100755 --- a/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname +++ b/package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname @@ -8,18 +8,14 @@ if sysconfig.setup_ifname then os.exit(0) end -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 +if platform.is_outdoor_device() or + platform.match('ar71xx', 'generic', { + 'airgateway', + '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