
22 Nov
2014
22 Nov
'14
7:23 p.m.
hi,
i'm trying to set a local variable and test the variable in an if-then-else script ... but it's somehow a bit weird!?
- set variable "nea" to 0 - create a script "x" and run .... OK - modify variable "nea" to 1 - run script "x" again ... NOK?!
... what i'm doing wrong - the behavior is the same with 2013.10 and 2014.01
U-Boot# nea=0 U-Boot# setenv x "if itest 1 -eq $nea; then echo var1; else echo var0;
fi;"
U-Boot# run x var0 U-Boot# nea=1 U-Boot# run x var0 <<<<<----- so now i should get the "var1" as a result U-Boot# echo $nea 1
U-Boot# setenv x "if itest 1 -eq $nea; then echo var1; else echo var0;
fi;"
U-Boot# run x var1 <<<<<------- after i set the script "x" again it's
working ... ?!
br & thx for any hint, Andy