}
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"
}
}
case "$(( $boardtype ))" in
"$((0x708))")
if [ "$adm_switch" = 0 ]; then
- nvram_set sdram_init 0x010b
+ 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
fi
;;
"$((0x467))")
- nvram_set sdram_init 0x010c
+ 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