diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2002-04-05 02:30:49 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2002-04-05 02:30:49 +0000 |
commit | cd7393b94051f11e7ecfda263a475d2e7971c193 (patch) | |
tree | 2f224401e91686cb1b50b4d91085277cadcdf2b4 /etc/rc | |
parent | 293815b90a63bfb4b51aa0aaa0d1d8fc6967f574 (diff) | |
download | FreeBSD-src-cd7393b94051f11e7ecfda263a475d2e7971c193.zip FreeBSD-src-cd7393b94051f11e7ecfda263a475d2e7971c193.tar.gz |
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
Diffstat (limited to 'etc/rc')
-rw-r--r-- | etc/rc | 42 |
1 files changed, 4 insertions, 38 deletions
@@ -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 |