PDA

View Full Version : Need someone that's good with the Terminal to help me!!




MattG
Jan 27, 2005, 07:31 AM
Hey everyone--

I'm running 10.3.7 on my Xserve, and I need the server to add a manual network route everytime it boots up. How do I accomplish this?

The command I'm entering manually in the terminal right now is:

sudo route add 10... 10.1.1.1

Or maybe this isn't something I need the Terminal to do? Help!



pigbat
Jan 27, 2005, 08:16 AM
Are you asking how to add it automatically on boot?

MattG
Jan 27, 2005, 08:33 AM
Are you asking how to add it automatically on boot?Yes!

pigbat
Jan 27, 2005, 09:06 AM
How familiar are you with Unix?

Edit....

Here's a quick tutorial on creating startup scripts.

http://www.osxfaq.com/Tutorials/LearningCenter/HowTo/Startup/index.ws

Look under Performing Unix commands at system startup:

MattG
Jan 27, 2005, 09:09 AM
How familiar are you with Unix?

I'm new to OS X and don't have a machine in front of me but here is a quick suggestion. Create a script to add the route and run it from /etc/rc during startup.

There may be a routing table somewhere that gets loaded on boot but I'm unaware of any. I haven't had an opportunity to play with routes much on mine yet.
Honestly I'm really not that familiar with Unix at all. I know a few commands. I don't even know how to make a script!

pigbat
Jan 27, 2005, 09:11 AM
How familiar are you with Unix?

Edit....

Here's a quick tutorial on creating startup scripts.

http://www.osxfaq.com/Tutorials/LearningCenter/HowTo/Startup/index.ws

Look under Performing Unix commands at system startup:


Check out that tutorial and see if you're comfortable with it. Always make a copy of any file before you start playing with it. This gives you a quick recovery point.

MattG
Jan 27, 2005, 10:06 AM
Check out that tutorial and see if you're comfortable with it. Always make a copy of any file before you start playing with it. This gives you a quick recovery point.
I read through it and it's very confusing. They don't make as simpler way to do this? In Windows I could just create a .BAT file to run every time the computer starts up. (Actually in Windows I can add a persistent route from the command prompt!)

pigbat
Jan 27, 2005, 10:48 AM
I read through it and it's very confusing. They don't make as simpler way to do this? In Windows I could just create a .BAT file to run every time the computer starts up. (Actually in Windows I can add a persistent route from the command prompt!)

Perhaps I shouldn't have jumped in here since I haven't been using OS X long. Is there a /etc/gateways file?

MattG
Jan 27, 2005, 11:00 AM
Perhaps I shouldn't have jumped in here since I haven't been using OS X long. Is there a /etc/gateways file?
Nope!

Mord
Jan 27, 2005, 11:14 AM
just put the command into VI and save it and put it into your start up items

MattG
Jan 27, 2005, 11:15 AM
just put the command into VI and save it and put it into your start up items

VI?