On 2005-06-08, Barry Margolin <barmar.RemoveThis@alum.mit.edu> wrote:
> I have a feeling what he really wanted to know was how to make it
> permanent, i.e. have the route be installed every time he boots.
Your probably right, I hadn't considered that.
It's easy to put these commands in a StartupItem, which can be
configured to run after networking is up. A launchd plist file should
also work but I don't know how to control ordering with launchd.
> On most Unix systems this is done by adding to /etc/rc or /etc/init.d
> scripts, but I don't think this is the preferred way in OS X.
As I know you know, there are no init.d scripts in osx. StartupItems,
and now launchd, do more or less the equivalent (minus the 'runlevel'
notion).
There is an /etc/rc but this is definitely not supposed to be used for
site-specific configuration of this kind.
In linux, or at least in redhat, there are per-interface files
specifically for manipulating routes when an interface comes up or goes
down. There are also more general per-interface files for doing
whatever else you might want to do at these times (eg tweak a firewall).
Files like this are very useful but afaik osx doesn't support anything
equivalent except for ppp. In the latter case, /etc/ppp/ip-up will run
when a ppp connection is established. This is a useful place to put
extra routing. Similarly, ip-down will run when the connection is
ended. So says the man page anyway - I haven't run ppp in osx for a
long time so I don't know if these files are really used as described.<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Route Table Question