summaryrefslogtreecommitdiff
path: root/package/nvram/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-01-21 23:48:23 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-01-21 23:48:23 +0000
commit0cde46b3e78cb09fdcda211edc8cea6d40acd2e4 (patch)
treeff4501693398d44b199af894a58f11b3f4b301e2 /package/nvram/files
parent64016fb476ddbcf3e3de07612c1f6e43982e0527 (diff)
downloadmtk-20170518-0cde46b3e78cb09fdcda211edc8cea6d40acd2e4.zip
mtk-20170518-0cde46b3e78cb09fdcda211edc8cea6d40acd2e4.tar.gz
mtk-20170518-0cde46b3e78cb09fdcda211edc8cea6d40acd2e4.tar.bz2
add support for OvisLink WL-1600GL
SVN-Revision: 19262
Diffstat (limited to 'package/nvram/files')
-rwxr-xr-xpackage/nvram/files/nvram.init8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/nvram/files/nvram.init b/package/nvram/files/nvram.init
index 75d712b..9eae17f 100755
--- a/package/nvram/files/nvram.init
+++ b/package/nvram/files/nvram.init
@@ -74,5 +74,13 @@ start() {
nvram set il0macaddr=$(nvram get et0macaddr|
awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}')
}
+
+ [ "$(nvram get et0macaddr)" = "00:90:4c:c0:00:08" ] && {
+ # OvisLink WL-1600GL mac workaround
+ nvram set et0macaddr=$(hexdump -n 6 -s 130976 -e '5/1 "%02x:" "%02x" ' /dev/mtd/0)
+ nvram set il0macaddr=$(nvram get et0macaddr|
+ awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}')
+ }
+
[ "$COMMIT" = "1" ] && nvram commit
}