[linux-fai] /etc/init.d/sendmail

Thomas Gebhardt gebhardt at HRZ.Uni-Marburg.DE
Wed Jun 14 13:21:24 CEST 2000


Hi,

I noticed that it tooks rather long to install sendmail. This is
due to the sendmail init.d script that tries to stop a non-existing
sendmail daemon.

(from software.log): 

Setting up sendmail (8.9.3-22) ...
Stopping mail transport agent: Waiting ........................................
..................... Failed  Done sendmail.

Each "." respresents two seconds, a total of two min.

Here is a workaround:

Include into fai_install() of rcS_fai (after install_base):

    # don't wait for sendmail init.d script
    chroot $FAI_ROOT /usr/sbin/dpkg-divert --add --rename --divert\
        /etc/init.d/sendmail.orig /etc/init.d/sendmail
    ln -s /bin/true $FAI_ROOT/etc/init.d/sendmail

and somewhere in the script directory undo these changes:

shellcommands:
	"/bin/rm -f ${target}/etc/init.d/sendmail"
	"/usr/sbin/chroot ${target} /usr/sbin/dpkg-divert --remove --rename --divert /etc/init.d/sendmail.orig /etc/init.d/sendmail"
	"/bin/mv -f ${target}/etc/init.d/sendmail.orig.dpkg-new ${target}/etc/init.d/sendmail"

This saves you 2 precious minutes per installation.

Kind regards, Thomas





More information about the linux-fai mailing list