Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Unix scripts

Unix scripts
Thread Tools
akayserv
Fresh-Faced Recruit
Join Date: Dec 2007
Status: Offline
Reply With Quote
Dec 8, 2007, 03:32 PM
 
In Unix Server, I want to add a script to add a default Gateway. I used following:
route add default IP Address

however when the Unix is switched off and re-started, I have to repeat this. How do I write a script so that it automatically adds the route during boot up.

regards
     
Tomchu
Mac Elite
Join Date: Sep 2005
Status: Offline
Reply With Quote
Dec 8, 2007, 04:18 PM
 
What actual operating system are you using? I ask because every *nix I've encountered has some sort of mechanism for adding the default gateway on boot, but it differs between OSes.
     
akayserv  (op)
Fresh-Faced Recruit
Join Date: Dec 2007
Status: Offline
Reply With Quote
Dec 8, 2007, 06:15 PM
 
I will find the version of the Unix operating system and let you know
     
smitty825
Forum Regular
Join Date: Sep 2003
Location: San Diego
Status: Offline
Reply With Quote
Dec 8, 2007, 07:29 PM
 
The easiest way to get the version of the OS you are using is to type the command 'uname -a' (no quotes) and then paste the output here. The output for OS X Leopard is:

Darwin Daniel-Smiths-Computer.local 9.1.0 Darwin Kernel Version 9.1.0: Wed Oct 31 17:48:21 PDT 2007; root:xnu-1228.0.2~1/RELEASE_PPC Power Macintosh
     
akayserv  (op)
Fresh-Faced Recruit
Join Date: Dec 2007
Status: Offline
Reply With Quote
Dec 9, 2007, 05:02 AM
 
The operating system is SCO Open Server (TM Releaase 5)

Regards
     
akayserv  (op)
Fresh-Faced Recruit
Join Date: Dec 2007
Status: Offline
Reply With Quote
Dec 9, 2007, 05:11 AM
 
When I types what you suggested, following comes up:
SCO-SV scosysv 3.2 5.0.5 i386

regards
     
smitty825
Forum Regular
Join Date: Sep 2003
Location: San Diego
Status: Offline
Reply With Quote
Dec 9, 2007, 11:25 AM
 
Well, having never used SCO unix before, I'm not sure if this solution will work or not, but a quick googling lead me to this link
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Dec 9, 2007, 01:41 PM
 
You want to think about replacing this server with a different Unix OS, I believe SCO has gone bankrupt.
     
Tomchu
Mac Elite
Join Date: Sep 2005
Status: Offline
Reply With Quote
Dec 9, 2007, 05:21 PM
 
Nope, not yet.

This may help: Setting the default gateway for SCO Openserver 5 : sco, gateway, default, openserver

Google Cache because experts-exchange.com is f***ing lame, and serves real pages with content to the GoogleBot, but serves pages with no content to you. They're actually breaking Google policy, but yeah -- there's the link.
     
bzImage
Junior Member
Join Date: Mar 2003
Status: Offline
Reply With Quote
Dec 10, 2007, 12:02 AM
 
Create a S99router file on the /etc/rc2.d directory

Inside this file put:

route add default <ip_address>

Save the file

and chmod 755 to it.

I worked on The Santa Cruz Operation for 10 years as technical support manager for Latinamerica
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:37 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,