Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Sep 1997 12:35:43 +0100
From:      Brian Somers <brian@awfulhak.org>
To:        Greg Lehey <grog@lemis.com>
Cc:        Brian Somers <brian@awfulhak.org>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: rc & rc.conf 
Message-ID:  <199709141135.MAA15300@awfulhak.demon.co.uk>
In-Reply-To: Your message of "Sun, 14 Sep 1997 10:13:50 %2B0930." <19970914101350.06261@lemis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> On Sat, Sep 13, 1997 at 10:16:39AM +0100, Brian Somers wrote:
> > This is a disaster waiting to happen:
> >
> > /etc/rc.conf:
> > [.....]
> > inetd_enable="YES"              # Run the network daemon displatcher (or NO).
> > [.....]
> > cron_enable="YES"       # Run the periodic job daemon.
> > [.....]
> >
> > /etc/rc:
> > [.....]
> > if [ "X${inetd_enable}" = X"YES" ]; then
> >         echo -n ' inetd';       inetd ${inetd_flags}
> > fi
> >
> > if [ "X${cron_enable}" = X"YES" ]; then
> >         echo -n ' cron';        cron
> > fi
> > [.....]
> 
> I'm sorry, I must be too stupid.  What's wrong with that?  And how
> does your fix fix it?  Since the flags and the -enable have been
> separated, it seems that we *should* insist on the exact string YES
> for the enable flags.

The problem is that with the "= YES" bit, if you accidently leave the 
variable out of rc.conf (like I did), NO is assumed.  With the "!= NO" 
bit, you get the program run by default and have to specifically 
disable it.

I think it's pretty rare that a machine wouldn't run inetd, and even 
rarer that it wouldn't run cron.

> Greg

-- 
Brian <brian@awfulhak.org>, <brian@freebsd.org>
      <http://www.awfulhak.org>;
Don't _EVER_ lose your sense of humour....





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709141135.MAA15300>