| Summary: | The internal command "read" is not working properly on arm processor | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Evgheni <aidjek> |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | CC: | aidjek, busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.18.x | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | linux | Target: | arm |
| Build: | |||
I'm sorry, I have found an error in my console command line. This bug is not actual more. Closing it. |
The internal command "read" is not working properly. How to reproduce: please use follow example: #!/bin/ash read -r -s -p "please enter password: " "var1" read -r -s -p "please retype password: " "var2" if [ "$var1" = "$var2" ] ; then echo user:$var1 | /usr/sbin/chpasswd -m else echo "Passwords don't match" fi On the standart linux system with busybox: #!/bin/sh read -r -s -p "please enter password: " "var1" + read -r -s -p 'please enter password: ' var1 please enter password: echo "var1 = $var1" + echo 'var1 = 123' var1 = 123 read -r -s -p "please retype password: " "var2" + read -r -s -p 'please retype password: ' var2 please retype password: echo "var2 = $var2" + echo 'var2 = 123' var2 = 123 if [ "$var1" = "$var2" ] ; then echo user:$var1 | /usr/sbin/chpasswd -m else echo "Passwords don't match" fi + '[' 123 = 123 ']' + echo user:123 + /usr/sbin/chpasswd -m On linux system with arm processor: read -r -s -p "please enter password: " "var1" + read -r -s -p please enter password: var1 please enter password: read -r -s -p "please retype password: " "var2" + read -r -s -p please retype password: var2 please retype password: if [ "$var1" = "$var2" ] ; then echo user:$var1 | /usr/sbin/chpasswd -m else echo "Passwords don't match" fi + [ = 123 ] + echo Passwords don't match Passwords don't match Conclusion: it's looks that "read" command missed first argument and uses it as argument of next "read" command. I have understood that may be it's dependent from different properties of my system and conditions of building busybox, but I have not found any records for "read" command in the menuconfig as was in previous versions. This bug has been found in versions 1.10.2 and 1.11.1 but only on ARM processor.