diff options
Diffstat (limited to 'package/base-files/files/lib/functions')
-rw-r--r-- | package/base-files/files/lib/functions/system.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index 176c10d065..94ccc02bb8 100644 --- a/package/base-files/files/lib/functions/system.sh +++ b/package/base-files/files/lib/functions/system.sh @@ -129,6 +129,17 @@ mtd_get_mac_encrypted_deco() { echo $macaddr } +mtd_get_mac_uci_config_ubi() { + local volumename="$1" + + . /lib/upgrade/nand.sh + + local ubidev=$(nand_attach_ubi $CI_UBIPART) + local part=$(nand_find_volume $ubidev $volumename) + + cat "/dev/$part" | sed -n 's/^\s*option macaddr\s*'"'"'\?\([0-9A-F:]\+\)'"'"'\?/\1/Ip' +} + mtd_get_mac_text() { local mtdname=$1 local offset=$(($2)) |