luci-base: make swconfig port state parsing more robust
authorJo-Philipp Wich <jo@mein.io>
Tue, 28 Jan 2020 17:14:28 +0000 (18:14 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 29 Jan 2020 08:19:28 +0000 (09:19 +0100)
commit8e2088f8d421647ccae9b38d6489e4b46164a335
tree6d385d81d5d29c93a17bc6dec90903b8d28471dc
parent84e23d96b47948e24ce17b79ab46a77cdedf9c2e
luci-base: make swconfig port state parsing more robust

Since swconfig output varies wildly among different switch drivers, rely
on a simpler more robust parsing approach to find the required information.

Ref: https://forum.openwrt.org/t/cannot-read-property-link/50766
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6d59a6400ed055d71e0b335679d291c22bbdbd40)
modules/luci-base/root/usr/libexec/rpcd/luci