base-files: rework mtd_get_mac_text()
authorMichael Pratt <[email protected]>
Sat, 10 Dec 2022 11:34:54 +0000 (06:34 -0500)
committerHauke Mehrtens <[email protected]>
Fri, 6 Jan 2023 14:34:07 +0000 (15:34 +0100)
commit1e3a8f454e46e6c235b972571761a0c6b23a3bfd
tree548938e4b8f750b09ddcec482f46a92534b123cd
parent766de7013fcef2a9d759e056bb40c1cb58cfd65f
base-files: rework mtd_get_mac_text()

It's necessary to be able to specify the length
for MAC addresses that are stored in flash, for example,
in a case where it is stored without any delimiter.

Let both offset and length have default values.

Add a sanity check related to partition size.

Also, clean up syntax and unnecessary lines.

Signed-off-by: Michael Pratt <[email protected]>
package/base-files/files/lib/functions/system.sh