Date: Mon, 3 May 1999 09:35:31 -0700 (PDT) From: "Rodney W. Grimes" <rgrimes@gndrsh.dnsmgr.net> To: lars@odin-corporation.com (Lars Fredriksen) Cc: braukmann@tse-online.de (Andreas Braukmann), current@FreeBSD.ORG Subject: Re: default route not set up?? Message-ID: <199905031635.JAA00473@gndrsh.dnsmgr.net> In-Reply-To: <372C8EF0.DCE3BD49@odin-corporation.com> from Lars Fredriksen at "May 2, 1999 12:44:16 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> Hi, > There are two things going on with the route setup. > > if [ "x$defaultrouter" != "xNO" ] ; then > static_routes="default ${static_routes}" > route_default="default ${defaultrouter}" > fi > > > 1) since route_default is never used, it should be deleted, ignore that > line above. Wrong, it is evaluated when this line is executed: eval route_args=\$route_${i} I wrote this code 4 years ago, it works, has been working and will continue to work. Please, just leave the static/default route stuff alone. > > 2) if you set defaultrouter to anything other than "NO", the > static_route variable gets a "default" route > route label added, and this label will get evaled later on. > > So rc.conf should read: (example from my setup) > > > defaultrouter="YES" # Set to default gateway (or NO). No, the comment is correct as it stands, set it to ``NO'' or set it to the IP address of the defaultroute + any funky route flags you may want on it. > static_routes="local" # Set to static route list (or leave > empty). > route_local=" -net <net ip> <host>" > route_default=" default <host>" Boo bad, your value of route_default will be smashed by rc.network when it does ``route_default="default ${defaultrouter}"''. You'll end up with the command ``route add default YES'' being executed, not something you really want :-) > > So, two actions are needed. The route_default line from rc.network should > get deleted, and the comment > in rc.conf for the defaultrouter variable should be clearer. > > If others agree, I can go and commit the fixes for that .... NO! Do not agree, read and understand what the trick above is, ``eval route_args=\${route_${i}'' when $i="default'' grabs the route_default for you. -- Rod Grimes - KD7CAX - (RWG25) rgrimes@gndrsh.aac.dev.com Accurate Automation, Inc. Reliable computers for FreeBSD http://www.aai.dnsmgr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905031635.JAA00473>