Subject: Re: misc/1919: merging functionality of netstart, etc, into rc
To: None <thorpej@nas.nasa.gov>
From: Luke Mewburn <lukem@telstra.com.au>
List: netbsd-bugs
Date: 01/10/1996 16:42:04
Jason Thorpe writes:
> Luke Mewburn <lukem@supp.cpr.itg.telecom.com.au> wrote:
> > After the changes, the following files are superfluous and can
> > be removed from the src tree and /etc:
> > ifaliases
> > myname
> > mygate
> > defaultdomain
> > hostname.*
> > netstart
> The problem with this approach is that it makes it more difficult for
> install scripts to work configuration magic. Note how the sparc and
> hp300 install scripts have an easy time configuring network interfaces,
> hostname, etc. by simply creating the appropriate files, rather than
> having to go through a complex editing process on a file which won't
> contain any special keywords like __REPLACE_ME, or whatever.
I don't feel that this should be major sticking point. User
convenience should be a priority over a small amount of extra work for
an install script writer... To be honest, this is a pet peeve of mine;
systems designed to save 5 minutes for a programmer that result in
more work for the end user.
Since the install script is only going to ask you to configure your
interfaces once, and it currently overwrites hostname.* anyway, you
can quite easily do the following in the install script (using
pseudocode here):
---
cat >/etc/rc.conf <<HEADER
#
# /etc/rc.conf - config stuff
#
HEADER
read hostname
echo "hostname=\"$hostname\"" >>/etc.rc.conf
...
read domainname
echo "domainname=\"$domainname\"" >>/etc.rc.conf
...
while ((i = getifname) != "done") {
if ($i == "done") end
read parameters
interfaces="$interfaces $i"
echo "interface_$i=\"parameters\""
}
echo "interfaces=\"$interfaces\""
...
read defaultrouter
if (defaultrouter != "") {
echo "defaultrouter=\"$defaultrouter\"" >>/etc.rc.conf
}
...
cat >/etc/rc.conf <<FOOTER
#
# set this to no to not use
routed_flags=-q
sendmail_flags=NO
....
FOOTER
---
You get the picture.
> Anyhow, my vote is to stick with what we've got ..
If it's the install script which is the only sticking point, I'll
rewrite a MI install (sub)script to handle this...