Date: Thu, 24 Apr 1997 11:54:15 -0700 (PDT) From: Curt Sampson <cjs@portal.ca> To: Michael Smith <msmith@atrad.adelaide.edu.au> Cc: "Jordan K. Hubbard" <jkh@time.cdrom.com>, hackers@freebsd.org Subject: Re: /etc/netstart bogons.. Message-ID: <Pine.NEB.3.96.970424114719.5109I-100000@cynic.portal.ca> In-Reply-To: <199704240036.KAA23544@genesis.atrad.adelaide.edu.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24 Apr 1997, Michael Smith wrote:
> > 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.
Not really, no. Setting the variable to "DEFAULT" means use the
default value. Many of our variables are set to "NO" not to run
the program, "DEFAULT" to use reasonable defaults, or a list of
flags. Thus, having the variable set to "" or unset (they're the
same thing in /bin/sh) means `run the program with no command line
arguments.'
We have other variables that simply turn things on or off, and
these are set to just YES or NO as needed.
As for using shell functions and passing program names and whatnot
as parameters, there are enough special cases out there that this
may not be worthwhile. Things like:
if [ "$nfs_server" = YES ] && [ -r /etc/exports ]; then
if [ "$mountd_flags" = DEFAULT ]; then
mountd_flags=""
fi
rm -f /var/db/mountdtab
echo -n > /var/db/mountdtab
echo -n ' mountd'; mountd $mountd_flags
if [ "$nfsd_flags" = DEFAULT ]; then
nfsd_flags="-tun 4"
fi
echo -n ' nfsd'; nfsd $nfsd_flags
nfs_locking=MAYBE
fi
cjs
Curt Sampson cjs@portal.ca Info at http://www.portal.ca/
Internet Portal Services, Inc. Through infinite myst, software reverberates
Vancouver, BC (604) 257-9400 In code possess'd of invisible folly.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96.970424114719.5109I-100000>
