[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Unattended package install.



> > I'm writing a script to install several packages using "dpkg -i" on
> > several machines and I'd like to set this up where it can be performed
> > unattended.
> > 
> > Some of the packages ask some questions during their installation
> > and I was wondering if there was some way I could pass them the answers
> > I'd like to use so they can go on and do their thing without any
> > further care and feeding.....the answeres will be the same every time for
> > this purpose.
> 
> You may try to include the following in your script:
> 
> dpkg -i somepackage.deb <<EOF
> your answers
> to the qustions 
> you know will be asked
> EOF

If you want to do this ``pretend to be the person typing answers'' approach, 
take a look at ``expect''.  It lets you run other programs under it's control, 
and look for certain output, before ``typing'' your desired input.

I seem to remember that someone wrote an expect script, that you run the
first time through, which records what you and the program did, and writes
an expect script for you --- I forget what it's called.

Ah, here it is:

  /usr/doc/expect5.24/examples/autoexpect

Cheers, Phil.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: