
Dear Nishanth Menon,
In message 1449255744-25787-1-git-send-email-nm@ti.com you wrote:
When we use the following in bootargs: v1=abc v2=123-${v1} echo ${v2} we get 123-${v1} when we should have got 123-abc This is because we do not recursively check to see if v2 by itself has a hidden variable. Fix the same with recursive call.
NOTE: this is a limited implementation as the next level variable default assignment etc would not function.
As I wrote in my comment to your previous versionof this patch, I think your approach is wrong:
Current behaviour is what a standard shell would do as well:
bash$ v1=abc bash$ v2='123-${v1}' bash$ echo $v2 123-${v1}
I think your change would causes non-standard shell behaviour.
If you want to evaluate variables, you have to do so as part of a "run" command...
Best regards,
Wolfgang Denk