From owner-freebsd-questions Thu Oct 18 1:50:18 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mip.co.za (puck.mip.co.za [209.212.106.44]) by hub.freebsd.org (Postfix) with ESMTP id 4CE8837B403; Thu, 18 Oct 2001 01:50:10 -0700 (PDT) Received: from patrick (patrick.mip.co.za [10.3.13.181]) by mip.co.za (8.9.3/8.9.3) with SMTP id KAA59972; Thu, 18 Oct 2001 10:49:48 +0200 (SAST) (envelope-from patrick@mip.co.za) From: "Patrick O'Reilly" To: "Alan Char" , Cc: , Subject: RE: upgrading and /etc/rc Date: Thu, 18 Oct 2001 10:52:50 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <200110180700.f9I70rf03272@localhost.meer.net> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alan, > Sorting shell scripts, even if they are just settings, seems > like a bad policy decision in general. Edwin has made the point: /etc/rc.conf is NOT a shell script, it is a collection of settings. I agree that it messes with comments, so what I do is something like this: ---------------------------------- sendmail_enable="YES" # Enable the sendmail daemon named_enable="NO" # DNS is running on 'apollo' inetd_enable="YES" # I need this to kick ftpd ---------------------------------- This way the sort simply results in: ---------------------------------- inetd_enable="YES" # I need this to kick ftpd named_enable="NO" # DNS is running on 'apollo' sendmail_enable="YES" # Enable the sendmail daemon ---------------------------------- One ADVANTAGE of sorting it is that you will quickly see when you have a duplicated entry (this little problem has caused me numerous grey hairs in the past!). If you have: ---------------------------------- sendmail_enable="YES" # Enable the sendmail daemon named_enable="NO" # DNS is running on 'apollo' inetd_enable="YES" # I need this to kick ftpd # Other lines here sendmail_enable="NO" # Disable during (whatever) ---------------------------------- you might pull your hair out (actually, that's what I did! I'm going bald, not grey!) trying to figure out why sendmail won't start during boot, because whenever you look at rc.conf you (human) see the first line which says its enabled, but fail to notice the later line which some careless sysadmin left lying around! After sorting you have: ---------------------------------- # Other lines here inetd_enable="YES" # I need this to kick ftpd named_enable="NO" # DNS is running on 'apollo' sendmail_enable="NO" # Disable during (whatever) sendmail_enable="YES" # Enable the sendmail daemon ---------------------------------- and now it is obvious even at a casual glance that you have an anomoly to sort out. Patrick. > Hi. Thanks for the flip response. My /etc/rc.conf has apparently been > inherited from older versions of FreeBSD since the installation process > by default does not overwrite it (except, recently, to sort its contents). > I have never edited /etc/rc.conf. At any rate, even for comments, this > is a really bad idea. Sorting shell scripts, even if they are just > settings, seems like a bad policy decision in general. --Alan > > > > Edwin Groothuis wrote: > > /etc/rc.conf should only be a configuration file, not a real script. > > /etc/rc.local is run via /etc/rc. man rc.conf says: > > > > The purpose of rc.conf is not to run commands or perform > system startup > > actions directly. Instead, it is included by the various > generic startup > > scripts in /etc which conditionalize their internal > actions according to > > the settings found there. > > > > So please don't :-) > > > > Edwin > > > On Wed, Oct 17, 2001 at 10:01:44PM -0700, Alan Char wrote: > > Hi. I upgraded from 4.3 to 4.4 today, and somehow in the process, > > the /etc/rc.conf file got sorted. This also happened when I upgraded > > from 4.2 to 4.3. Unfortunately, /etc/rc.conf has a little if-block > > at the end to run /etc/rc.local, and after it sorting it creates a > > syntax error. Doesn't do much for making comments useful, either. > > Is there a way to turn off this "feature"? Thanks. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message