openwrt/package/base-files/files/lib/functions
Michael 'ASAP' Weinrich 12bc79d6d5
base-files: fix wrong ucidef_set_network_device_mac network-device entry
The ucidef_set_network_device_* functions in uci-defaults.sh disagree
on whether to use "network-device" or "network_device" in board.json.
With the additional caveat that jshn will translate hyphens (-) into
underscores (_). This casues problems in netifd which expected
"network_device" causing boards which depend on assigning MACs in
board.json via uci-defaults.sh (or jshn in general) to fail.

This commit addresses the issue by using network_device in
uci-defaults.sh.

The bug was uncovered in the forums here:
https://forum.openwrt.org/t/support-for-rtl838x-based-managed-switches/57875/2596

This was exposed by commit 4ebba8a05d ("realtek: add support for HPE
1920-8g-poe+") where the board_config_load call from 03_gpio introduced
the key normalization by jshn.

Fixes: 9290539ca9 ("base-files: allow setting device and bridge macs")
Tested-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: Michael 'ASAP' Weinrich <michael@a5ap.net>
[ improve commit title, description and fix wrong Tested-by tag ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-10-20 12:53:43 +02:00
..
caldata.sh base-files: add minimal mmc support 2021-11-01 00:56:51 +01:00
leds.sh treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
migrations.sh treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
network.sh base-files: add support for retrieving IPv6 assignments 2023-02-24 23:56:36 +01:00
preinit.sh treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
service.sh base-files: remove function service_kill 2014-06-02 12:43:10 +00:00
system.sh base-files: rework mtd_get_mac_text() 2023-01-06 15:34:07 +01:00
uci-defaults.sh base-files: fix wrong ucidef_set_network_device_mac network-device entry 2023-10-20 12:53:43 +02:00