From owner-freebsd-current Sun Apr 9 02:34:06 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id CAA14081 for current-outgoing; Sun, 9 Apr 1995 02:34:06 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id CAA14075 for ; Sun, 9 Apr 1995 02:34:01 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.8/8.6.6) id CAA18011; Sun, 9 Apr 1995 02:27:09 -0700 From: "Rodney W. Grimes" Message-Id: <199504090927.CAA18011@gndrsh.aac.dev.com> Subject: Re: sysconfig To: bde@zeta.org.au (Bruce Evans) Date: Sun, 9 Apr 1995 02:27:08 -0700 (PDT) Cc: current@FreeBSD.org In-Reply-To: <199504011734.DAA16054@godzilla.zeta.org.au> from "Bruce Evans" at Apr 2, 95 03:34:20 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 1874 Sender: current-owner@FreeBSD.org Precedence: bulk > > I'm now fairly happy with the way /etc/rc stuff is done. > > I've noticed a problem with the way sysconfig is used: netstart, (etc.) > doesn't source it directly, so netstart only work when sourced from rc. > netstart should probably source sysconfig for itself and be run by `sh' > instead of `.' from rc. Here is my fix for this: Add this to the start of /etc/netstart: # If there is a global system configuration file, suck it in. # This may have already been done by /etc/rc, but since this # script can run standalone (often done when single user) we # need to do it again here if [ -f /etc/sysconfig ]; then . /etc/sysconfig fi I see no real reason to change /etc/rc, as sourcing /etc/sysconfig twice will not hurt us in anyway. It also would allow for /etc/netstart to create values and have them appear in /etc/rc if they are needed later. > The "#!/bin/sh" line in netstart is bogus now > because netstart isn't self-supporting; Above fixes that reason. There is still one more problem, /etc/netstart can't find the route binary becuase the PATH does not have /sbin on it when booted single user for some reason. I will fix this RSN. > it is also bogus because > netstart is installed with perms 644. It has been that way for a long time, the reasoning (as I understand it) was that with /etc in your path (no longer true) if you typed netstart on accident, it would go off and happily try to start the networking code. It can still occur with . in your path if you happen to be sitting in /etc. This also applies to /etc/sysconfig, /etc/rc, /etc/rc.i386, and /etc/security. I see no real reason to change it, if you really want them to run sh filename or . filename is easy enough. -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Custom computers for FreeBSD