Re: latest rc.subr breaks etc/rc.d/sendmail

From: Giorgos Keramidas <keramida_at_ceid.upatras.gr>
Date: Thu, 6 Mar 2008 22:19:05 +0200
On 2008-03-06 16:23, Mike Makonnen <mtm_at_FreeBSD.Org> wrote:
> On Sat, 2008-02-02 at 03:27 +0200, Giorgos Keramidas wrote:
> > Hi Mike,
> > Revision 1.80 of src/etc/rc.subr stops Sendmail from starting
> > here with:
> > 
> > root_at_kobe:/root# /etc/rc.d/sendmail start
> > Cannot 'start' sendmail. Set sendmail_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'.
> > root_at_kobe:/root#
> > 
> > My /etc/rc.conf contains:
> > 
> > root_at_kobe:/root# grep sendmail /etc/rc.conf
> > sendmail_enable="NO"
> > sendmail_outbound_enable="NO"
> > sendmail_submit_enable="YES"
> > sendmail_msp_queue_enable="YES"
> > root_at_kobe:/root#
> 
> Can you try the attached patch please?

It worked, thanks :)

> In the long term I think the sendmail script will have to be broken up
> into its constituent parts, but this should fix the problem.

Agreed.  We should probably consult gshapiro about this, and just do it
if there's no objection.  AFAIK, /etc/rc.d/sendmail is also used to
start alternative MTAs, so we can commit this patch for now, and think
about splitting /etc/rc.d/sendmail to something like:

   src/etc/rc.d/sendmail
   src/etc/rc.d/sendmail-submit
   src/etc/rc.d/sendmail-outbound
   src/etc/rc.d/sendmail-msp-queue

One thing to consider before a switch like this is that admins may have
installed scripts which assume that /etc/rc.d/sendmail is all they need :/

> Index: etc/rc.d/sendmail
> ===================================================================
> RCS file: /home/ncvs/src/etc/rc.d/sendmail,v
> retrieving revision 1.18
> diff -u -r1.18 sendmail
> --- etc/rc.d/sendmail   8 Dec 2007 07:20:22 -0000       1.18
> +++ etc/rc.d/sendmail   21 Feb 2008 07:38:42 -0000
> _at__at_ -72,7 +72,9 _at__at_
>         fi
>  }
>  
> -run_rc_command "$1"
> +if checkyesno sendmail_enable; then
> +       run_rc_command "$1"
> +fi
>  
>  required_files=
>  
> _at__at_ -90,9 +92,11 _at__at_
>         run_rc_command "$1"
>  fi
>  
> -name="sendmail_clientmqueue"
> -rcvar="sendmail_msp_queue_enable"
> -start_cmd="${command} ${sendmail_msp_queue_flags}"
> -pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
> -required_files="/etc/mail/submit.cf"
> -run_rc_command "$1"
> +if checkyesno sendmail_msp_queue_enable; then
> +       name="sendmail_clientmqueue"
> +       rcvar="sendmail_msp_queue_enable"
> +       start_cmd="${command} ${sendmail_msp_queue_flags}"
> +       pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
> +       required_files="/etc/mail/submit.cf"
> +       run_rc_command "$1"
> +fi
Received on Thu Mar 06 2008 - 19:34:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:28 UTC