[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Using expect to install an rpm package

Asked by atxtechie in Perl Programming Language, Bourne Shell (sh), TCL Scripting Language

Tags: expect script perl

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?
1:
2:
3:
4:
5:
6:
7:
#!/usr/local/bin/expect
 
spawn sh /home/user/DIConnectivityMain-9.2.3.64-linux.sh
expect "More"
send "q"
expect "Do you agree to the above license terms?"
send "yes\r"
[+][-]10/26/09 01:27 PM, ID: 25666439Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/29/09 12:18 AM, ID: 25691222Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/03/09 09:29 AM, ID: 25731326Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625