diff options
| author | Felix Fietkau <nbd@openwrt.org> | 2005-11-15 21:25:26 +0000 |
|---|---|---|
| committer | Felix Fietkau <nbd@openwrt.org> | 2005-11-15 21:25:26 +0000 |
| commit | 7aa8a68e8f7f10a5c4b0209b2f8600c4870d0e4c (patch) | |
| tree | 38fd3d69809ee2c5125271cefd69dcb228ff585b | |
| parent | 16ed33a1b02740d4feb9cf8992aa9168740de349 (diff) | |
| download | upstream-7aa8a68e8f7f10a5c4b0209b2f8600c4870d0e4c.tar.gz upstream-7aa8a68e8f7f10a5c4b0209b2f8600c4870d0e4c.tar.bz2 upstream-7aa8a68e8f7f10a5c4b0209b2f8600c4870d0e4c.zip | |
add extra safety for linksys nvram fixup (should fix #56, though i haven't been able to reproduce it)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2506 3c298f89-4303-0410-b956-a3cf2f4a3e73
| -rwxr-xr-x | openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram b/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram index ea40cd704e7..728b2847b19 100755 --- a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram +++ b/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram @@ -21,9 +21,9 @@ nvram_default() { } nvram_set() { # for the linksys fixup part - [ "$(nvram get "$1")" = "$2" ] || { + [ "$(nvram get "$1")" = "$2" -a "$2" != "" ] || { COMMIT=1 - nvram set "$1=$2" + /usr/sbin/nvram set "$1=$2" } } @@ -35,7 +35,7 @@ adm_switch="$(( ($boardflags & 0x80) >> 7 ))" case "$(( $boardtype ))" in "$((0x708))") if [ "$adm_switch" = 0 ]; then - nvram_set sdram_init "$(printf 0x%04x $(( $(nvram get sdram_init) | 0x0100 )))" + nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" [ "$COMMIT" = 1 ] && { nvram_set sdram_config 0x0062 nvram_set clkfreq 216 @@ -49,7 +49,7 @@ case "$(( $boardtype ))" in fi ;; "$((0x467))") - nvram_set sdram_init "$(printf 0x%04x $(( $(nvram get sdram_init) | 0x0100 )))" + nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" [ "$COMMIT" = 1 ] && { nvram_set sdram_config 0x0062 nvram_set sdram_ncdl 0x0 |
