Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with editing /etc/default/tcp

Status
Not open for further replies.

jasona45

Technical User
May 15, 2003
37
US
I'm very new to Sco 5.0.6 and have no idea how to edit /etc/default/tcp. I know how to get there through scoadmin: system, system defaults manager, domain, netmask, and broadcast address:tcp (ADM). When I open this I'm trying to edit the default gateway. I don't know what commands to use to edit this and to save it when done editing. I added the default gateway by using route add default but after reboot disappears. I read other threads and said I had to edit /etc/default/tcp. So if anyone knows how to do this please help?
 
Create a script in /etc/rc2.d, say S89route, with the route add default stuff. Don't forget to do a chmod +x to make them executable.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Is there an easier way to do this? If not can you go into more detail on how to do this?
 
With vi create a /etc/rc2.d/S99route script file with your route add ... commands. Make it executable (chmod +x /etc/rc2.d/S99route).
You can now reboot your system to verify that the routes are still active.
man rc
man vi
man route
man chmod


Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
I'll answer your original question, but before that I'd like to point out that even though there are sometimes many ways to get something accomplished, doing it 'by the book' is sometimes better since you may not always be the person administrating a system. I've used /etc/rc.d/8/userdef and even /etc/rc2.d/S99route 'methods' to add routing information at boot time, and other admins miss it because they are looking for the 'documented' methods. But then leave it to SCO to keep changing the 'documented' method between releases...


Under SCO OpenServer 5.0.6 Enterprise, you can edit the /etc/default/tcp file directly. Since you are working on a unix system, I _strongly_ suggest you at least learn the basics of using the 'vi' (or 'vim', if you will) editor. This editor is found on just about every unix platform in a base install and is going to be your way around editing files. The commands are a bit cryptic to learn, but simple enough.

You should be logged in as 'root' to do the following steps to edit your tcp file, typing the commands in RED . Do NOT press the Enter key unless stated.:

1. Login as root.

2. When you get a # prompt, type the following, vi /etc/default/tcp and press Enter . This starts the 'vi' editor with editing the file in question.

3. You should now be looking at a file on your screen, press the letter j (lowercase) until your cursor is on the line starting with GATEWAY=. You can also use arrow keys, but h=left, j=down, k=right, l=up if a terminal emulation doesn't support arrows. So j moves your cursor down a line at a time.

4. Press the letter l (again, lowercase) until your cursor is on the 'equals' (=) symbol, then press the letter a. Type the IP address of your gateway, then press the Esc key. You are using the letter l to move the cursor to the right, then pressing a 'appends' after the cursor in edit mode. Pressing Esc exits edit mode.

5. Type the : character, then type wq and press the Enter key. The : starts a different type of vi command, then the w means write the file, the q means quit the editor.

6. You should now be at a '#' prompt again, your /etc/default/tcp file edited to set a default route at boot time.

 
Thank you for breaking it down like that for me. I appreciate the time you took to wright this.

Thanks Again
 
the problem with editting /etc/tcp directly is that it will get overwritten when the kernel is rebuilt.....
use the S99route method.

unix42
 
....need more coffee.....can't read.......
/etc/tcp <> /etc/default/tcp

sorry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top