base-files: fix mtd_get_mac_text not accepting hex offsets
authorDavid Bauer <mail@david-bauer.net>
Wed, 4 Sep 2019 18:46:10 +0000 (20:46 +0200)
committerDavid Bauer <mail@david-bauer.net>
Thu, 5 Sep 2019 18:31:56 +0000 (20:31 +0200)
The mtd_get_mac_text helper method did not support hexadecimal offset
values, resulting them to break after 75bfc393ba6c ("treewide:
convert MAC address location offsets to hexadecimal")

This commit fixes this by evaluating the hexadecimal input,
converting them to decimal.

Signed-off-by: David Bauer <mail@david-bauer.net>
package/base-files/files/lib/functions/system.sh

index 9b9d03df7b06fb887b25e9c2895399e792705683..2a43d18d33d7bb1bfa5b5c4c43f03f3bf0feb657 100644 (file)
@@ -40,7 +40,7 @@ mtd_get_mac_ascii() {
 
 mtd_get_mac_text() {
        local mtdname=$1
-       local offset=$2
+       local offset=$(($2))
        local part
        local mac_dirty