Skip site navigation (1)Skip section navigation (2)
Date:      23 Apr 97 13:48:52 -0500
From:      "Richard Wackerbarth" <rkw@dataplex.net>
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        hackers@freebsd.org
Subject:   Re: /etc/netstart bogons..
Message-ID:  <AF83C3CC-7AADC@204.69.236.50>

next in thread | raw e-mail | index | archive | help
On Wed, Apr 23, 1997 1:05 PM, Jordan K. Hubbard <mailto:jkh@time.cdrom.com>
wrote:
>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..

WRT "gateway", I agree the default (missing) should be NO.

However, "router" is more complicated because they use the variable to
indicate
WHICH router to start. Therefore the test needs to be null or "NO" -> no
router
otherwise start the designated router.





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