Hello,

I try the following script in u-boot
---------------------------------------------------------------------
setenv error 'if true; then
        echo **** ERROR ****
        exit;
fi'

setenv foo echo "****************This should not be printed"
setenv loadubi

setenv updfs 'if true; then
        echo; echo ========== Updating rootfs ==========; echo;
        if run loadubi; then
                echo ***************loadubi
        else;
                run error
        fi
fi'

echo ========== start ==========

run updfs
run foo
---------------------------------------------------------------------

running it with:

bpp3> source 80008000
## Executing script at 80008000
========== start ==========

========== Updating rootfs ==========

## Error: "loadubi" not defined
**** ERROR ****
****************This should not be printed
bpp3>

I expected that the script (if loadubi is not defined) exits after
the "echo **** ERROR ****", and do not print the line
"****************This should not be printed"

Is this a feature or a bug in hush shell?

Thanks for any hints!

bye,
Heiko
--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to