openwrt/package/base-files/files/lib
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
..
functions base-files: don't store label MAC address in uci system config 2019-11-07 17:13:18 +01:00
preinit base-files: move urandom seed bits into separate package 2019-06-11 08:06:28 +02:00
upgrade base-files: upgrade: add case to export_bootdevice 2019-10-09 21:00:02 +02:00
functions.sh base-files: move xor() from caldata extraction to functions.sh 2019-10-13 19:03:57 +02:00