base-files: rename hostname with EUI of mac address
authorRosy Song <rosysong@rosinson.com>
Mon, 4 Nov 2019 19:44:41 +0000 (20:44 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Thu, 7 Nov 2019 16:13:18 +0000 (17:13 +0100)
commit6170c46b477d4953f91b99e805a276de444913cf
tree323d7cb101d84fa1adaf52d9079dbe7a284556d8
parenta6fbdd3a7837ea93d65115a62001ab96d5ff0b67
base-files: rename hostname with EUI of mac address

If a label MAC address is provided for device, system
will rename the hostname with OpenWrt_{eui mac address}.
This helps to distinguish between different devices.

Since it's no good idea to nest json_* functions, this code does
not use get_mac_label directly, but only get_mac_label_dt as
external resource.

Signed-off-by: Rosy Song <rosysong@rosinson.com>
[merged with commit introducing macaddr_geteui, rebased on updated
label MAC address storage, extended commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
package/base-files/files/bin/config_generate
package/base-files/files/lib/functions/system.sh