diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/base-files/files/lib/preinit/10_indicate_preinit | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit index 3c59929790..56e96c63ba 100644 --- a/package/base-files/files/lib/preinit/10_indicate_preinit +++ b/package/base-files/files/lib/preinit/10_indicate_preinit @@ -72,14 +72,20 @@ preinit_config_board() { json_select network json_select "lan" - json_get_vars ifname + json_get_vars device + json_get_values ports ports json_select .. json_select .. - [ -n "$ifname" ] || return + [ -n "$device" -o -n "$ports" ] || return + + # swconfig uses $device and DSA uses ports + [ -z "$ports" ] && { + ports="$device" + } # only use the first one - ifname=${ifname%% *} + ifname=${ports%% *} if [ -x /sbin/swconfig ]; then # configure the switch, if present |