Re: Unattended package install. (fwd)
Thought this might be of intrest.
Henry Hollenberg firstname.lastname@example.org
---------- Forwarded message ----------
Date: Fri, 03 Apr 1998 09:34:59 +0100
From: Philip Hands <email@example.com>
To: Alex Yukhimets <firstname.lastname@example.org>
Cc: Henry Hollenberg <email@example.com>,
Subject: 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
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:
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com