interactive postinst scripts

Bruce Edge bedge at troikanetworks.com
Thu Aug 8 17:21:39 CEST 2002



> -----Original Message-----
> From: Thomas Gebhardt [mailto:gebhardt at hrz.uni-marburg.de]
> Sent: Thursday, August 08, 2002 3:00 AM
> To: linux-fai at uni-koeln.de
> Subject: interactive postinst scripts
> 
> 
> Hi,
> 
> some Debian packages expect some key strokes during installations
> that are not handled by debconf. One of the most prominent packages
> of this type is sendmail.
> 
> I already diverted /usr/sbin/sendmailconfig and 
> /usr/share/sendmail/update_notices, but the postinst script still
> wants someone to press a key. The postinst script does something
> useful, so you cannot simply disable it.
> 
> Is there a recommended default strategy to deal with packages
> of that type?
> 
> Thanks, Thomas
> 

Here's my scripts/SENDMAIL/S01setup script:

#! /bin/sh

# This is the real one we need.
fcopy /etc/mail/sendmail.mc
fcopy /etc/aliases

# sendmailconfig has a bug where it sets a path wrong if it sees sendmail in the same dir
$ROOTCMD mv /usr/sbin/sendmail /sbin/sendmail
# Hand it 5 <CR>s, to accept default answeres
$ROOTCMD /bin/bash -c "cd /; /usr/sbin/sendmailconfig; cd -" <<-EOF
""





EOF
# Put sendmail back after sendmailconfig has run
$ROOTCMD mv /sbin/sendmail /usr/sbin/sendmail


# Create new aliases at startup from yp server
fcopy /etc/init.d/mailaliases

ln -sf ../init.d/mailaliases $target/etc/rc2.d/S30mailaliases



More information about the linux-fai mailing list