[Bug 3973] New: The internal command "read" is not working properly on arm processor

bugzilla at busybox.net bugzilla at busybox.net
Wed Jul 13 07:09:00 UTC 2011


https://bugs.busybox.net/show_bug.cgi?id=3973

              Host: linux
            Target: arm
           Summary: The internal command "read" is not working properly on
                    arm processor
           Product: Busybox
           Version: 1.18.x
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
        AssignedTo: unassigned at busybox.net
        ReportedBy: aidjek at gmail.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


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.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list