Subject: Re: Hallo, I got a dumb question....
To: Erik Osheim <erik@plastic-idolatry.com>
From: David Maxwell <david@vex.net>
List: port-i386
Date: 08/18/2004 15:03:50
On Wed, 18 Aug 2004, Erik Osheim wrote:
> On Wed, Aug 18, 2004 at 10:53:00AM -0400, David Maxwell wrote:
> > On Wed, 18 Aug 2004, Andreas Drewke wrote:
> > > ... but its really urgent...
> > > 
> > > how can one set up multiple static routes in NetBSD????
> > 
> > Manually, at runtime, as root:
> > 
> > route add [destnetip] -netmask [netmask] [gwip]
> > 
> > To have them come back at boot, add the same commands in a file called
> > /etc/netstart.local
> 
> Ok, so /etc/netstart.local is how have the 'route' command automatically
> run on boot. Thanks, David.

Well, it's -one of- the ways to do it.

There are so many different ways to set up a network, and processes on a
Unix host that there's isn't a standardized way of doing every thing you
might want to do.

> Out of curiousity, is there some resource that documents this (I've
> never heard of /etc/netstart.local before)? If so, what is it, and if
> not, then should there be a manpage for it (or a mention in route's
> manpage, or something)?? Up until now I had just used /etc/rc.local for
> it because I never knew of any other resource.

When I saw your question, I started with "Well, /etc/rc.local is always
a way to do it as a last resort". However, I thought there might be a
more specific method. Knowing that the route command would be how the
routes were added, I did a 'grep route /etc/rc.d/*', and read through
the references.

Since there wasn't any file which was read looking for routes to add, I
figured that the exec'd netstart.local, which is called from the bottom
of rc.d/netstart, would be a good choice.

So, I didn't find it via documentation, but by examining the sources.

-- 
David Maxwell, david@vex.net|david@maxwell.net --> The only difference I see
between voodoo and marketing research is that voodoo sometimes works! 
						- Leonard Stern