From owner-freebsd-hackers Sun Sep 14 05:02:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA07240 for hackers-outgoing; Sun, 14 Sep 1997 05:02:30 -0700 (PDT) Received: from awfulhak.demon.co.uk (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA07232 for ; Sun, 14 Sep 1997 05:02:22 -0700 (PDT) Received: from gate.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.demon.co.uk (8.8.5/8.8.5) with ESMTP id MAA15300; Sun, 14 Sep 1997 12:35:43 +0100 (BST) Message-Id: <199709141135.MAA15300@awfulhak.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: Greg Lehey cc: Brian Somers , freebsd-hackers@FreeBSD.ORG Subject: Re: rc & rc.conf In-reply-to: Your message of "Sun, 14 Sep 1997 10:13:50 +0930." <19970914101350.06261@lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 14 Sep 1997 12:35:43 +0100 From: Brian Somers Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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 , Don't _EVER_ lose your sense of humour....