diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-11-04 20:44:41 +0100 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-11-07 17:13:18 +0100 |
commit | a6fbdd3a7837ea93d65115a62001ab96d5ff0b67 (patch) | |
tree | 15dd2fa665d0ee3fe66ec16f84d18103e9d28555 /package/base-files/files/bin/config_generate | |
parent | a9219457730f81b842bfc3520f60cbc625f66e1e (diff) | |
download | upstream-a6fbdd3a7837ea93d65115a62001ab96d5ff0b67.tar.gz upstream-a6fbdd3a7837ea93d65115a62001ab96d5ff0b67.tar.bz2 upstream-a6fbdd3a7837ea93d65115a62001ab96d5ff0b67.zip |
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>
Diffstat (limited to 'package/base-files/files/bin/config_generate')
-rwxr-xr-x | package/base-files/files/bin/config_generate | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 0b26afe57f..3ca035ca8b 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -260,11 +260,6 @@ generate_static_system() { uci -q set "system.@system[-1].hostname=$hostname" fi - local label_macaddr - if json_get_var label_macaddr label_macaddr; then - uci -q set "system.@system[-1].label_macaddr=$label_macaddr" - fi - if json_is_a ntpserver array; then local keys key json_get_keys keys ntpserver |