Re: Unattended package install.
> #!/usr/bin/expect -f
> set timeout -1
> spawn dpkg -i/cdrom/bo/binary-i386/devel/kernel-source-2.0.30_2.0.30-7.deb
> match_max 100000
> 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 -- "email@example.com\r"
> expect eof
> Anybody see where I've gone astray?
Could this be because the package that prompts for ``local kernel maintainer''
is kernel-package, not kernel-source ?
BTW, here is a script that does this using Austin Schutz <firstname.lastname@example.org>'s
Expect.pm module for perl:
use Expect ;
# these should be got from the user or a database
$name="Philip Hands" ;
$dpkg = Expect->spawn("dpkg -i kernel-package_4.04.deb") ||
die "Couldn't spawn dpkg, $!" ;
$dpkg->expect(undef, "Please supply the full name of the local kernel maintainer\r\n\t:") ||
die "Never got name prompt\n" ;
print $dpkg "$name\r" ;
$dpkg->expect(undef, "Please supply the email address of the local kernel maintainer\r\n\t:") ||
die "Never got email prompt\n" ;
print $dpkg "$email\r" ;
# wait for dpkg to exit.
Has anyone debianised Expect.pm (I've not found it as a .deb) ?
Also has anyone debianised IO::Tty/Pty and IO::Stty (which are required
by Expect.pm) ?
If not, I'll do so. I seem to remember someone talking about standardising
the packaging of CPAN perl libraries a while back. Did anything come of that ?
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org