openwrt/package/base-files/files/lib/functions
Adrian Schmutzler a6fbdd3a78 base-files: don't store label MAC address in uci system config
If set, label MAC address is available from one of two sources,
device tree or board.json. So far, the function get_mac_label
was meant for retrieving the address, while an option in uci
system config was specified only for case 2 (board.json).

The uci config option has several drawbacks:
- it is only used for a fraction of devices (those not in DT)
- label MAC address is a device property, while config implies
  user interaction
- label_macaddr option will only be set if /etc/config/system
  does not exist (i.e. only for new installations)

Thus, this patch changes the behavior of get_mac_label:
Instead of writing the value in board.json to uci system config
and reading from this location afterwards, get_mac_label now
extracts data from board.json directly. The uci config option
won't be used anymore.
In addition, two utility functions for extraction only from DT
or from board.json are introduced.

Since this is only changing the access to the label MAC address, it
won't interfere with the addresses stored in the code base so far.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-11-07 17:13:18 +01:00
..
caldata.sh treewide: use a single ath10k MAC patching function with checksum 2019-10-15 18:13:54 +02:00
leds.sh base-files: get_dt_led: don't warn about missing led 2018-04-04 09:12:39 +02:00
migrations.sh base-files: add leds migration 2019-04-06 19:14:05 +02:00
network.sh base-files: add network_get_uptime() to /lib/functions/network.sh 2019-06-29 21:00:58 +02:00
preinit.sh base-files: fix ramoverlay function with kernels 3.18+ 2015-09-21 17:41:07 +00:00
service.sh
system.sh base-files: don't store label MAC address in uci system config 2019-11-07 17:13:18 +01:00
uci-defaults.sh base-files: uci-defaults: do config flush in one shot 2019-10-22 11:39:28 +02:00