From: David Bauer Date: Wed, 4 Sep 2019 18:46:10 +0000 (+0200) Subject: base-files: fix mtd_get_mac_text not accepting hex offsets X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4c060228cb7756bada6ded3fe9d23a48b9a797ee;p=openwrt%2Fstaging%2Fwigyori.git base-files: fix mtd_get_mac_text not accepting hex offsets 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 --- diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index 9b9d03df7b..2a43d18d33 100644 --- a/package/base-files/files/lib/functions/system.sh +++ b/package/base-files/files/lib/functions/system.sh @@ -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