Date: Thu, 24 Apr 1997 13:04:52 +1000 (EST) From: "Daniel O'Callaghan" <danny@panda.hilink.com.au> To: "Jordan K. Hubbard" <jkh@time.cdrom.com> Cc: David Nugent <davidn@unique.usn.blaze.net.au>, hackers@freebsd.org Subject: Re: /etc/netstart bogons.. Message-ID: <Pine.BSF.3.91.970424125227.10264Y-100000@panda.hilink.com.au> In-Reply-To: <8775.861847143@time.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 23 Apr 1997, Jordan K. Hubbard wrote: > > The problem is that it isn't always a "YES" that the variable is > > set to. A test for an empty variable should, however, be made the > > Well, yes, but only because our current scheme is braindead. ;-) > > > BTW, since our /bin/sh groks functions, why aren't these blocks a > > function? Something along the lines of: > > An interesting idea. One that could even be taken a little further... > > It's time to start talking in diffs. To follow. :-) One problem with the use of sh functions is that all functions must be declared before their use. See rc.serial for example of how awful this turns out to be. The "main" section of rc.serial is the last few lines in the file. But what about changing it to something like: ----------------- #!/bin/sh - # $Id: rc.net,v 1.0 . /etc/rc.d/rc.net.functions set_hostname panda.hilink.com.au tcp_extensions yes default_domainname none wma no # weak mountd authentication interface lo0 127.0.0.1 255.0.0.0 interface ed0 203.8.15.25 255.255.255.248 gateway yes defaultrouter no ...etc, etc.... ------------------ rc.net.functions of course has all of the relevant functions in it. By '.'ing rc.net.functions, rc.net stays readable. Danny
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.970424125227.10264Y-100000>