I am a QE tester attempting to automate an installation script on Redhat 5 for one of our software offerings. I am needing to run a script that shows an End-User license agreement and asks the installer to type Yes or no before continuing to install an rpm package. I am trying to use expect to complete this job. I created a script to install this package. When the script is run, the end-user needs to hit the 'q' button to get past the license information or hit space 4 times, then they need to type 'yes', after that the installer should install the package. What I am finding is that the expect script gets up to the point where the question is prompted and then it stops, nothing is installed. I am running the expect script as root. I have attached the expect script. Does anyone know what I am doing wrong?
spawn sh /home/user/DIConnectivityMain-188.8.131.52-linux.sh
expect "Do you agree to the above license terms?"