From e2d271b480d8498e079c49af2dafbd05acdf672a Mon Sep 17 00:00:00 2001 From: Jan-Tarek Butt Date: Sun, 8 Dec 2019 23:39:54 +0100 Subject: [PATCH] package/gluon-core: ignore double quoting in mac addr split --- package/gluon-core/files/lib/netifd/proto/gluon_wired.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/gluon-core/files/lib/netifd/proto/gluon_wired.sh b/package/gluon-core/files/lib/netifd/proto/gluon_wired.sh index 31ad5342..708e9743 100755 --- a/package/gluon-core/files/lib/netifd/proto/gluon_wired.sh +++ b/package/gluon-core/files/lib/netifd/proto/gluon_wired.sh @@ -14,9 +14,10 @@ xor2() { echo -n "${1:1:1}" | tr '0123456789abcdef' '23016745ab89efcd' } +# shellcheck disable=SC2086 interface_linklocal() { local macaddr="$(ubus call network.device status '{"name": "'"$1"'"}' | jsonfilter -e '@.macaddr')" - local oldIFS="$IFS"; IFS=':'; set -- "$macaddr"; IFS="$oldIFS" + local oldIFS="$IFS"; IFS=':'; set -- $macaddr; IFS="$oldIFS" echo "fe80::$(xor2 "$1")$2:$3ff:fe$4:$5$6" }