Changeset 3316


Ignore:
Timestamp:
2006-03-06T09:25:06+01:00 (10 years ago)
Author:
mbm
Message:

cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/whiterussian/openwrt/package/base-files/default/etc/init.d/S05nvram

    r3075 r3316  
    3030# work around braindead CFE defaults in linksys routers 
    3131boardtype=$(nvram get boardtype) 
     32boardnum=$(nvram get boardnum) 
     33product_name=$(nvram get product_name) 
     34 
    3235boardflags=$(($(nvram get boardflags))) 
    33 [ "$boardtype" = "bcm94710dev" ] && boardtype="0xdeadbeef" 
    3436adm_switch="$(( ($boardflags & 0x80) >> 7 ))" 
     37 
    3538case "$(( $boardtype ))" in 
    36         "$((0x708))") 
     39        "1800") #0x708 
    3740                if [ "$adm_switch" = 0 ]; then 
    3841                        nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" 
     
    4952                fi 
    5053        ;; 
    51         "$((0x467))") 
     54        "1127") #0x467 
    5255                nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" 
    5356                [ "$COMMIT" = 1 ] && { 
     
    6467[ "$COMMIT" = "1" ] && nvram commit 
    6568 
    66  
    6769# linksys bug; remove when not using static configuration for lan 
    6870nvram set lan_proto="static" 
    6971 
    7072# hacks for wrt54g 1.x hardware 
    71 [  "$(nvram get boardnum)"  = "42" \ 
    72 -a "$(nvram get boardtype)" = "bcm94710dev" ] && { 
     73[  "$boardnum"  = "42" \ 
     74-a "$boardtype" = "bcm94710dev" ] && { 
    7375        debug "### wrt54g 1.x hack ###" 
    7476        nvram set vlan1hwname="et0" 
     
    7981 
    8082# hacks for asus wl-500g deluxe 
    81 [  "$(nvram get boardtype)" = "bcm95365r" \ 
    82 -a "$(nvram get boardnum)" = "45" ] && { 
     83[  "$boardnum"  = "45" \ 
     84-a "$boardtype" = "bcm95365r" ] && { 
    8385        debug "### wl-500g deluxe hacks ###" 
    8486        nvram set vlan0hwname="et0" 
     
    108110                # wl-500g defaults. these are placed here, because WL-HDD and WL-300g 
    109111                # might have the same nvram settings. 
    110                 [ "$(nvram get boardnum)" = "asusX" \ 
    111                 -a "$(nvram get boardtype)" = "bcm94710dev" ] && { 
     112                [ "$boardnum"  = "asusX" \ 
     113                -a "$boardtype" = "bcm94710dev" ] && { 
    112114                        nvram_default wan_device "eth1" 
    113115                } 
     
    116118 
    117119# hacks for wap54g hardware 
    118 [  "$(nvram get boardnum)" = "2" \ 
    119 -o "$(nvram get boardnum)" = "1024" ] && { 
     120[  "$boardnum" = "2" \ 
     121-o "$boardnum" = "1024" ] && { 
    120122        debug "### wap54g hack ###" 
    121123        nvram set wan_ifname="none" 
     
    123125 
    124126# hacks for buffalo wla2-g54l 
    125 [  "$(nvram get boardnum)" = "00" \ 
    126 -a "$(nvram get product_name)" = "Product_name" \ 
    127 -o "$(nvram get product_name)" = "WLA2-G54L" ] && { 
     127[  "$boardnum" = "00" \ 
     128-a "$product_name" = "Product_name" \ 
     129-o "$product_name" = "WLA2-G54L" ] && { 
    128130        debug "### wla2-g54l hacks ###" 
    129131        nvram set wan_ifname="none" 
     
    161163        awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') 
    162164} 
    163  
Note: See TracChangeset for help on using the changeset viewer.