From cd7393b94051f11e7ecfda263a475d2e7971c193 Mon Sep 17 00:00:00 2001 From: gshapiro Date: Fri, 5 Apr 2002 02:30:49 +0000 Subject: Quoting Peter Wemm, "At great personal risk, touch the sendmail startup again." As an alternative to sendmail_enable=NONE, solve the boot time problem for non-sendmail users completely by moving all of the sendmail startup code from /etc/rc to /etc/rc.sendmail. The source for that script will be kept in src/etc/sendmail/rc.sendmail so make.conf's NO_SENDMAIL will prevent it from being installed. A new rc.conf variable, mta_start_script specifies the script to run to start the user's preferred MTA. For backward compatibility, it will default to /etc/rc.sendmail. The specified script is called out of /etc/rc after checking to make sure it exists. A new rc.sendmail.8 man page has also been added which now houses the sendmail_* variable descriptions formerly in rc.conf.5. Use /etc/rc.sendmail in /etc/mail/Makefile to reduce code duplication. Reviewed by: -current, -stable, obrien, peter, ru MFC after: 1 week --- etc/rc | 42 ++++-------------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) (limited to 'etc/rc') diff --git a/etc/rc b/etc/rc index 1ac04b2..422e523 100644 --- a/etc/rc +++ b/etc/rc @@ -702,44 +702,10 @@ case ${usbd_enable} in ;; esac -# Note: Please keep the sendmail startup code here in sync with the code -# in src/etc/mail/Makefile. -case ${sendmail_enable} in -[Nn][Oo][Nn][Ee]) - ;; -[Yy][Ee][Ss]) - echo -n ' sendmail' - /usr/sbin/sendmail ${sendmail_flags} - ;; -*) - case ${sendmail_submit_enable} in - [Yy][Ee][Ss]) - echo -n ' sendmail-submit' - /usr/sbin/sendmail ${sendmail_submit_flags} - ;; - *) - case ${sendmail_outbound_enable} in - [Yy][Ee][Ss]) - echo -n ' sendmail-outbound' - /usr/sbin/sendmail ${sendmail_outbound_flags} - ;; - esac - ;; - esac - ;; -esac - -case ${sendmail_enable} in -[Nn][Oo][Nn][Ee]) - ;; -*) - if [ -r /etc/mail/submit.cf ]; then - case ${sendmail_msp_queue_enable} in - [Yy][Ee][Ss]) - echo -n ' sendmail-clientmqueue' - /usr/sbin/sendmail ${sendmail_msp_queue_flags} - ;; - esac +case ${mta_start_script} in +/*) + if [ -r ${mta_start_script} ]; then + sh ${mta_start_script} fi ;; esac -- cgit v1.1