package/gluon-core: ignore double quoting in mac addr split
This commit is contained in:
parent
6dbabad49f
commit
e2d271b480
@ -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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user