Date: Thu, 24 Apr 1997 10:06:48 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: jkh@time.cdrom.com (Jordan K. Hubbard) Cc: hackers@freebsd.org Subject: Re: /etc/netstart bogons.. Message-ID: <199704240036.KAA23544@genesis.atrad.adelaide.edu.au> In-Reply-To: <2911.861818756@time.cdrom.com> from "Jordan K. Hubbard" at "Apr 23, 97 11:05:56 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Jordan K. Hubbard stands accused of saying:
> 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
Define a helper function somewhere (/etc/sysconfig.functions?)
and call it var_isset() or similar; have it return true if
the value is set, and not NO.
> 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..
Make a call now as to whether empty counts as set or unset. NetBSD's
convention is that set-but-empty means to use the default value,
whatever that is.
> Jordan
--
]] Mike Smith, Software Engineer msmith@gsoft.com.au [[
]] Genesis Software genesis@gsoft.com.au [[
]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[
]] realtime instrument control. (ph) +61-8-8267-3493 [[
]] Unix hardware collector. "Where are your PEZ?" The Tick [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704240036.KAA23544>
