Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Apr 1997 11:05:56 -0700
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        hackers@freebsd.org
Subject:   /etc/netstart bogons..
Message-ID:  <2911.861818756@time.cdrom.com>

next in thread | raw e-mail | index | archive | help
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..

					Jordan




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2911.861818756>