Date: Sun, 9 Apr 1995 02:27:08 -0700 (PDT) From: "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com> To: bde@zeta.org.au (Bruce Evans) Cc: current@FreeBSD.org Subject: Re: sysconfig Message-ID: <199504090927.CAA18011@gndrsh.aac.dev.com> In-Reply-To: <199504011734.DAA16054@godzilla.zeta.org.au> from "Bruce Evans" at Apr 2, 95 03:34:20 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504090927.CAA18011>