From owner-freebsd-hackers Wed Apr 23 12:06:34 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA17374 for hackers-outgoing; Wed, 23 Apr 1997 12:06:34 -0700 (PDT) Received: from zibbi.mikom.csir.co.za (zibbi.mikom.csir.co.za [146.64.24.58]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA17365 for ; Wed, 23 Apr 1997 12:06:29 -0700 (PDT) Received: (from jhay@localhost) by zibbi.mikom.csir.co.za (8.8.5/8.8.5) id VAA07853; Wed, 23 Apr 1997 21:05:27 +0200 (SAT) From: John Hay Message-Id: <199704231905.VAA07853@zibbi.mikom.csir.co.za> Subject: Re: /etc/netstart bogons.. In-Reply-To: <2911.861818756@time.cdrom.com> from "Jordan K. Hubbard" at "Apr 23, 97 11:05:56 am" To: jkh@time.cdrom.com (Jordan K. Hubbard) Date: Wed, 23 Apr 1997 21:05:27 +0200 (SAT) Cc: hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > In /etc/netstart (and elsewhere) we have constructs of the form: > > if [ "x$gateway" != "xNO" ]; then > echo 'configuring host as a gateway.' > sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 > fi > > if [ "x$router" != "xNO" ] ; then > echo -n starting routing daemon: > echo -n " ${router}"; ${router} ${routerflags} > echo '.' > fi > > if [ "x$ipxgateway" != "xNO" ]; then > ... > > And so on. This is, needless to say, DEEPLY DEEPLY EVIL since it will > cause these features to be turned on in the _absence_ of any such flag > setting, say because you have an old /etc/sysconfig file. You make > the world and you copy your new /etc files over (or this is done by > "upgrade") and having missed the new variables in sysconfig, you're > now quite surprised to see that you're running IPX and your machine > now considers itself a gateway. :-) > > Any objection to reversing the polarity on these various ifs? If > there's no variable or it's not explicitly set to YES, the operation > should fail. Speak now or hold your peace, please.. > I don't mind if it is changed. I think the problem started from the fact that some of the programs like IPXrouted can be run with no arguments and it would be valid, so setting ipxrouted="" is a valid option. Maybe we should give all these variables a valid value in the beginning of netstart before sysconfig is pulled in? John -- John Hay -- John.Hay@mikom.csir.co.za