openwrt/package/base-files/files
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
..
bin base-files: don't store label MAC address in uci system config 2019-11-07 17:13:18 +01:00
etc base-files: coreutil-date breaks setting kernel timezone 2019-10-12 23:43:08 +02:00
lib base-files: don't store label MAC address in uci system config 2019-11-07 17:13:18 +01:00
rom rename default/ to files/ 2006-11-22 23:30:57 +00:00
sbin base-files: hotplug-call: exit success when dir is absent 2019-10-29 13:28:49 +00:00
usr base-files: validate firmware for compatibility with backup 2019-09-08 09:10:30 +02:00