From ahd@kew.com  Tue Sep 22 19:32:42 1998
Received: from kendra.ne.mediaone.net (kendra.ne.mediaone.net [24.128.94.182])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA02558
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 22 Sep 1998 19:32:41 -0700 (PDT)
          (envelope-from ahd@kew.com)
Received: (from ahd@localhost)
	by kendra.ne.mediaone.net (8.9.1/8.9.1) id VAA00547;
	Tue, 22 Sep 1998 21:44:40 -0400 (EDT)
Message-Id: <199809230144.VAA00547@kendra.ne.mediaone.net>
Date: Tue, 22 Sep 1998 21:44:40 -0400 (EDT)
From: software@kew.com
Reply-To: software@kew.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: /etc/rc looks for /etc/sendmail.cf at startup
X-Send-Pr-Version: 3.2

>Number:         8031
>Category:       conf
>Synopsis:       [patch] /etc/rc looks for /etc/sendmail.cf at startup
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    peter
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 22 19:40:01 PDT 1998
>Closed-Date:    Sun Jun 4 14:05:30 PDT 2000
>Last-Modified:  Sun Jun 04 14:06:51 PDT 2000
>Originator:     Drew Derbyshire
>Release:        FreeBSD 2.2.7-RELEASE i386
>Organization:
Kendra Electronic Wonderworks
>Environment:

	standard FreeBSD 2.2.7 but with sendmail 8.9.1 installed
	with "new" location for sendmail.cf of /etc/mail

>Description:

	As pointed out in the sendmail 8.9.x documentation, sendmail's
	configuration files are moving over the course of the next few
	releases to /etc/mail.  FreeBSD will lag this, of course, but
	there is no reason to actively break such a configuration of 
	advanced releases.

	Futhermore, if the system admin somehow deletes the file
	and expects the rc.conf enablement of sendmail to handle
	the details, no error message is issued if the file is
	missing -- sendmail just doesn't start.

>How-To-Repeat:

	Install sendmail with sendmail.cf in /etc/mail (must patch
	source).  Delete /etc/sendmail.cf.  Reboot.

>Fix:
	
	Delete the redundant check with the following patch.  Note that if
	the file *is* missing and needed, sendmail prints out a (useful)
	nasty message about its missing file

*** rc	Tue Sep 22 20:18:46 1998
--- rc.old	Tue Sep 22 20:18:32 1998
***************
*** 250,256 ****
  	echo -n ' printer';		lpd ${lpd_flags}
  fi
  
! if [ "X${sendmail_enable}" = X"YES" ]; then
  	echo -n ' sendmail';	/usr/sbin/sendmail ${sendmail_flags}
  fi
  
--- 250,256 ----
  	echo -n ' printer';		lpd ${lpd_flags}
  fi
  
! if [ "X${sendmail_enable}" = X"YES" -a -r /etc/sendmail.cf ]; then
  	echo -n ' sendmail';	/usr/sbin/sendmail ${sendmail_flags}
  fi
  

>Release-Note:
>Audit-Trail:

From: Brian Cully <shmit@kublai.com>
To: software@kew.com, FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: conf/8031: /etc/rc looks for /etc/sendmail.cf at startup
Date: Wed, 23 Sep 1998 07:53:56 -0400

 On Tue, Sep 22, 1998 at 09:44:40PM -0400, software@kew.com wrote:
 > *** rc	Tue Sep 22 20:18:46 1998
 > --- rc.old	Tue Sep 22 20:18:32 1998
 
 You used diff with the wrong args. ITYM `diff rc.old rc', HTH, HAND.
 
 -bjc (With appy polly loggies to DES)
 

From: Drew Derbyshire <ahd@kew.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  Subject: Re: conf/8031: /etc/rc looks for /etc/sendmail.cf at startup
Date: Wed, 23 Sep 1998 08:00:43 -0400 (EDT)

 Whooops, got the diff backwards.
 
 *** /etc/rc.old	Tue Sep 22 20:18:32 1998
 --- /etc/rc	Tue Sep 22 20:18:46 1998
 ***************
 *** 250,256 ****
   	echo -n ' printer';		lpd ${lpd_flags}
   fi
   
 ! if [ "X${sendmail_enable}" = X"YES" -a -r /etc/sendmail.cf ]; then
   	echo -n ' sendmail';	/usr/sbin/sendmail ${sendmail_flags}
   fi
   
 --- 250,256 ----
   	echo -n ' printer';		lpd ${lpd_flags}
   fi
   
 ! if [ "X${sendmail_enable}" = X"YES" ]; then
   	echo -n ' sendmail';	/usr/sbin/sendmail ${sendmail_flags}
   fi
   

From: Studded <Studded@dal.net>
To: Drew Derbyshire <ahd@kew.com>
Cc: freebsd-bugs@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: conf/8031: /etc/rc looks for /etc/sendmail.cf at startup
Date: Wed, 23 Sep 1998 10:58:45 -0700

 Drew Derbyshire wrote:
 
 	This isn't directed towards Drew, but technically the RHS of the test
 should be "XYES" instead of how it is now. The '=' conditional compares
 strings, so the LHS is correct, and it should be the same on both sides.
 There are numerous examples of this error. Although personally I would
 prefer something that is a little more user friendly, like:
 
 case "${sendmail_enable}" in
   YES | yes )
     echo -n ' sendmail'
     /usr/sbin/sendmail "${sendmail_flags}"
     ;;
 esac
 
 I'd be happy to submit a patch if it had a chance of being committed. :)
  
 >  ! if [ "X${sendmail_enable}" = X"YES" ]; then
 >         echo -n ' sendmail';    /usr/sbin/sendmail ${sendmail_flags}
 >    fi

From: dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= )
To: Studded <Studded@dal.net>
Cc: Drew Derbyshire <ahd@kew.com>, freebsd-bugs@FreeBSD.ORG,
        freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: conf/8031: /etc/rc looks for /etc/sendmail.cf at startup
Date: 23 Sep 1998 21:20:15 +0200

 Studded <Studded@dal.net> writes:
 > 	This isn't directed towards Drew, but technically the RHS of the test
 > should be "XYES" instead of how it is now. The '=' conditional compares
 > strings, so the LHS is correct, and it should be the same on both sides.
 > [...]
 > >  ! if [ "X${sendmail_enable}" = X"YES" ]; then
 > >         echo -n ' sendmail';    /usr/sbin/sendmail ${sendmail_flags}
 > >    fi
 
 The X is totally unnecessary as long as you have quotes around the
 variable to make sure you get an empty string (rather than a missing
 argument) if it's undefined or empty.
 
 [ "${sendmail_enable}" = YES ] &&
   echo -n ' sendmail' && /usr/sbin/sendmail ${sendmail_flags}
 
 Might as well throw in a ${sendmail_program} for good measure:
 
 [ "${sendmail_enable}" = YES ] &&
   echo -n ' sendmail' && ${sendmail_program} ${sendmail_flags}
 
 I prefer to place the echo command last so that ' sendmail' is not
 printed unless sendmail started successfully.
 
 DES
 -- 
 Dag-Erling Smrgrav - dag-erli@ifi.uio.no

From: Brian Somers <brian@Awfulhak.org>
To: dag-erli@ifi.uio.no (Dag-Erling C. Sm rgrav )
Cc: Studded <Studded@dal.net>, Drew Derbyshire <ahd@kew.com>,
        freebsd-bugs@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: conf/8031: /etc/rc looks for /etc/sendmail.cf at startup 
Date: Thu, 24 Sep 1998 10:32:32 +0100

 > Studded <Studded@dal.net> writes:
 > > 	This isn't directed towards Drew, but technically the RHS of the test
 > > should be "XYES" instead of how it is now. The '=' conditional compares
 > > strings, so the LHS is correct, and it should be the same on both sides.
 > > [...]
 > > >  ! if [ "X${sendmail_enable}" = X"YES" ]; then
 > > >         echo -n ' sendmail';    /usr/sbin/sendmail ${sendmail_flags}
 > > >    fi
 > 
 > The X is totally unnecessary as long as you have quotes around the
 > variable to make sure you get an empty string (rather than a missing
 > argument) if it's undefined or empty.
 [.....]
 
 Not if someone's set (say) ``sendmail_enable=-x'' ;-)  The only 
 unnecessary bits are the {} around the variable and the quotes around 
 the YES, but the quotes make it clearer that the X isn't *really* part 
 of the comparison.
 
 > DES
 > -- 
 > Dag-Erling Smrgrav - dag-erli@ifi.uio.no
 
 -- 
 Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <brian@OpenBSD.org>
       <http://www.Awfulhak.org>
 Don't _EVER_ lose your sense of humour....
 
 
Responsible-Changed-From-To: freebsd-bugs->peter 
Responsible-Changed-By: phantom 
Responsible-Changed-When: Mon Jan 10 05:28:23 PST 2000 
Responsible-Changed-Why:  
peter's area 
State-Changed-From-To: open->closed 
State-Changed-By: nrahlstr 
State-Changed-When: Sun Jun 4 14:05:30 PDT 2000 
State-Changed-Why:  
We now look for sendmail.cf in /etc/mail.  This was fixed in 
revision 1.204 of etc/rc by obrien. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=8031 
>Unformatted:
