Changeset 2507


Ignore:
Timestamp:
2005-11-15T22:26:39+01:00 (11 years ago)
Author:
nbd
Message:

add extra safety for linksys nvram fixup (should fix #56, though i haven't been able to reproduce it)

File:
1 edited

Legend:

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

    r2452 r2507  
    2222 
    2323nvram_set() { # for the linksys fixup part 
    24         [ "$(nvram get "$1")" = "$2" ] || { 
     24        [ "$(nvram get "$1")" = "$2" -a "$2" != "" ] || { 
    2525                COMMIT=1 
    26                 nvram set "$1=$2" 
     26                /usr/sbin/nvram set "$1=$2" 
    2727        } 
    2828} 
     
    3636        "$((0x708))") 
    3737                if [ "$adm_switch" = 0 ]; then 
    38                         nvram_set sdram_init "$(printf 0x%04x $(( $(nvram get sdram_init) | 0x0100 )))" 
     38                        nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" 
    3939                        [ "$COMMIT" = 1 ] && { 
    4040                                nvram_set sdram_config 0x0062 
     
    5050        ;; 
    5151        "$((0x467))") 
    52                 nvram_set sdram_init "$(printf 0x%04x $(( $(nvram get sdram_init) | 0x0100 )))" 
     52                nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" 
    5353                [ "$COMMIT" = 1 ] && { 
    5454                        nvram_set sdram_config 0x0062 
Note: See TracChangeset for help on using the changeset viewer.