1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2010 OpenWrt.org
7 [ -d /sys
/class
/ieee80211
] ||
exit
15 config_get cfmac
"$cfg" macaddr
17 [ "$cfmac" != "00:90:4c:5f:00:2a" ] ||
{
18 local nvmac
="$(nvram get il0macaddr 2>/dev/null)"
19 [ -n "$nvmac" ] && [ "$nvmac != "$cfmac ] && {
20 uci
set wireless.
$cfg.macaddr
="$nvmac"
27 config_foreach fixup_wmac wifi-device
29 [ "$commit" = 1 ] && uci commit wireless