#!/bin/sh set -e mac_to_ipv6_ll() { IFS=':'; set $1; unset IFS echo "fe80::$(printf %02x $((0x$1 ^ 2)))$2:${3}ff:fe$4:$5$6" } mac_to_ipv6_ll $(qm config $1 | grep -oE ..:..:..:..:..:.. | tr '[:upper:]' '[:lower:]')