rc script ?

Nummi_G4

New Rhapsody User
If I have a command that needs to be run on startup after everything else has loaded, which rc script to I add it to?

I need to run:
route add -net 10.0.0.0 10.61.1.10
after everything else has loaded in order for my computer to connect to the network properly.
 
what is it that you are trying to do? are you serving as a router? The bad news is that networking in OSX is not managed as Unix or linux and webmin has no access to network configuration files on OSX.
 
I don't know anything about what Gabriel said, but you will want to add it both to

/private/etc/rc (multi-user startup)
/private/etc/rc.boot (single-user startup)
 
Originally posted by michaelsanford

/private/etc/rc (multi-user startup)
/private/etc/rc.boot (single-user startup)

Thanks. But where in that file do I actually put it? There is a whole bunch of code in there.... I'm afraid to just copy and paste anywhere.
 
This is just a guess, but I would put it right before the call to configd, and if that doesn't work, immediately after, in rc

Then, just after "hostname localhost" in rc.boot

If anyone has a 'rule' on where this should be added that is different from this suggestion, please speak up ;)
 
OK... I put the command into the rc files. Now... how do I know if they are working? (I'm not a *NIX guy, just the Mac geek. :))
 
Hehe I have no idea. The route(8) utility manually adds routes to the routing table. Since i have no idea what your network configuration is, I can't tell you if it's 'working properly' or not.

Maybe that line adds a route to help load-balance on your LAN or something, but it could connect perfectly well without it.

Call whomever told you to add that line to your start-up routine and ask them if it's 'working'.
 
Back
Top