Perl: answering automatically to install questions


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl: answering automatically to install questions
# 1  
Old 02-23-2006
Perl: answering automatically to install questions

Hi everybody,

I have been looking for an answer to this issue both on google and on the forum, but I couldn't find anything. please help me Smilie

As part of an automated (in perl) install of Solaris 9, I would like to be able to answer automaticaly to the question the installer asks.
Example:


/> /cdrom/cdrom0/s0/Solaris_9/Tools/Installers/liveupgrade20
...
<Press ENTER to continue>
...
<--[21%]--[ENTER To Continue]--[n To Finish]--> n
...

Enter 'y' to accept the license agreement. Enter 'n' to decline the license
agreement and exit the install. Y
...

<Press ENTER to continue>


etc...

Here, I woud like to automatically answer via my perl script that is the following sequence: "enter" then "n" then "y" then "enter"

Is it possible in perl? Can I do it without using threads? Do I have to make a dedicated perl script running in the background that will detect the prompts and answer them? Or maybe a shell script could do it ??? Smilie

in summary: HELP ME PLEASE

Thanks !!!! Smilie

Last edited by zaap; 02-23-2006 at 02:28 PM.. Reason: typo
# 2  
Old 02-23-2006
So you have tried to use Expect and didn't work out? Or you wouldn't like to use it?

I have no experience with Expect but for questions like these the usual first response I frequently heard from the Perl people was "Expect".
# 3  
Old 02-26-2006
That's also the answer I had from an other forum: use expect. I'll dig it monday when back to work :-) but it's probably what I'll have to do !

thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Questions about remote access and install USB devices.

I have a server running openindiana, it hosts virtualbox and several VMs on it. My first question is if I can run openindiana desktop from my windows on same network, now I am using XWin server under cygwin-X, I can run GUI of VirtualBox etc. but can I have the openindiana desktop show on my... (2 Replies)
Discussion started by: wyx2000
2 Replies

2. Shell Programming and Scripting

Perl Debug Stepping Answering Questions

I am new to perl and want to get a little better understanding of debugging code in perl. I have a perl script that has questions to be answered like: he following PERL modules are recommended: Crypt::DES Crypt::PasswdMD5 IO::Pty Net::Write::Layer2 String::CRC32 Attempt to install... (0 Replies)
Discussion started by: metallica1973
0 Replies

3. HP-UX

How can i install HP-UX OS automatically?

Hello Friends, I need to install HP-UX OS automatically on HP servers. If anybody know this. Please comment on it and share the steps as well. Thanks & Reagrds, Sameer (2 Replies)
Discussion started by: sameer007
2 Replies

4. Programming

How to automatically install all modules required by a script from CPAN?

Having a script.pl how can I automatically download from CPAN all required modules and install and update as required? Something like "emerge -uDNav world" for the perl? ---------- Post updated at 05:38 PM ---------- Previous update was at 05:28 PM ---------- Doesn't matter I've found it ... (6 Replies)
Discussion started by: Tribe
6 Replies

5. Shell Programming and Scripting

ssh -t answering automatically to the password

hi, i'm using the folowing ssh command to list the newuser "crontab' from myuser ssh -t myuser@host1 "sudo -u newuser crontab -l" this is ok but it is asking me a password. Mot de passe de myuser: The problem is that i want to answer it automatically in a shell script with the... (22 Replies)
Discussion started by: Nicol
22 Replies

6. Red Hat

Questions About RHEL 6, CentOS 5.5 download and install

Hi, I have some questions about RHEL and CentOS download and installation. (1) Is RHEL6.0 x86_64 beta downloaded from Red Hat site working fine? (2) Where to download CentOS 5.5 DVD iso without using BitTorrent? (3) What are the differences between these two images - CentOS 5.5 i386 and... (6 Replies)
Discussion started by: aixlover
6 Replies

7. Shell Programming and Scripting

need shell or Perl script to get the epoch time automatically

I need shell or Perl script to get the epoch time automatically Example I need to execute mysql command to delete content less then given epoch time If date is 01-07-2010 (dd-mm-yy) epoch should be lees 7 days mean 23-06-2010 for 23-06-2010 I need epoch time Delete BS_table where... (1 Reply)
Discussion started by: sreedhargouda
1 Replies

8. UNIX for Dummies Questions & Answers

Samba pre-install questions.

Greetings, I hope this is the right forum. I am looking to install Samba on my Linux box on my home network. I'm pretty sure I can deal with the how, I'm just not certain of the what. ok I'm using Debian lenny with no GUI. I have apt working and I've successfully installed and used one package... (10 Replies)
Discussion started by: fguy
10 Replies

9. Solaris

questions on how to install Solaris 10 via DVD/RW external device

Whoa...glad to see this forum si up and running, as a few weeks ago I tried to check in and found it directing me somewhere else and felt maybe this board was being hijacked or someone was closing down this forum. Here is a problem I am having. I got a SunFire V100 and disc with Solaris 10 on... (8 Replies)
Discussion started by: bluridge
8 Replies

10. Shell Programming and Scripting

Perl questions - more

More questions for Perl on Windows (again I apologize its on windows... ) 1. How can I check free disk space on a drive in windows using perl command in a script? 2. How can I check processes running using perl command (as I would normally be able to see in task manager for example) 3. I... (7 Replies)
Discussion started by: frustrated1
7 Replies
Login or Register to Ask a Question