Re: Unattended package install.
Henry Hollenberg email@example.com
On Sat, 4 Apr 1998, Philip Hands wrote:
> > I tried it and it seemed to die in the middle of the generation of
> > it's script. It might have something to do with my script hanging at
> > the end though.
> Just run the interactive bits through the expect script. i.e.:
> /usr/doc/expect5.24/examples/autoexpect -f inewsinn.exp \
> dpkg -i `find . -name "inewsinn_*.deb"`
> and fill in the blanks. Once done, have a look at the new script. Each
> prompt should have been turned into an ``expect'' statement, but there will be
> a lot of stuff you don't need, and you need to make the script capable of
> surviving variable prompts.
Ok, I gave it a shot with kernel-source-2.0.30_2.0.20-7.deb using
autoexpect. Something went wrong as I only got three lines of output:
spawn dpkg -i.....
So I tried to just wing it after I noticed the repetitive pattern of
But I don't seem to be doing something correctly. The package install
runs but it pukes when it get's to the stage of accepting my input or
"send" commands. Here is the script I was using:
set timeout -1
spawn dpkg -i/cdrom/bo/binary-i386/devel/kernel-source-2.0.30_2.0.30-7.deb
expect -exact "Please supply the full name of the local kernel maintainer"
send -- "Henry Hollenberg\r"
expect -exact "Please supply the email address of the local kernel
send -- "firstname.lastname@example.org\r"
Anybody see where I've gone astray?
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org