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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/etc/rc.d/8

Status
Not open for further replies.
Apr 24, 2003
164
CA
as far as I can tell this is the spot for userdefianable scripts to run on startup...
Can I just add a script with executable perms to this directory... Or do I add a line to the userdefs file??

--What I am trying to accomplish is for a default route to be assigned upon boot...

This is what my script (defaultroute) looks like... And I have added it to the /etc/rc.d/8 directory with root ownership and chmod 744...
---
#!/bin/sh
route add default 192.168.2.1
---

Is this going to work??

Thx

--Rory--
 
Thx for your response.

I have not tried it because people tend to be annoyed when you reboot their server in the middle of the day!

Ok you say "I would normally create a S99xxx file on /etc/rc2.d"

What is the diff. between what I did and this solution??

--Rory--


 
(Just asking. Perfectly good answer)

rc2.d will be processed at the same time as the other TCP/IP bits. S99 will only assure that your script is one of the last ones to be processed.

rc.d/8

The rc structure is kept for compatibility with Xenix.
All new stuff should use the rc2.d directory, using a file naming convention that determines how the scripts are run.

see man rc2.d for further explanation.

For your specific case I would also have a look at file
S90iproute which is there to manage static routes (so it may already be doing what you need, and you will only need to add the route to the correct file)





Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Hello,
What is the structure of a S99xx file.
Thanks.

Daniel Urbina
e-mail: danieluc@ec-red.com
==================================================
"What difference does it make to the dead, the orphans, and the homeless,
whether the mad destruction is brought under the name of totalitarianism
or the holy name of liberty and democracy?" - Gandhi
==============================
 
Look at some of the P??? S??? scripts, take a simple one for a pattern. You will notice, the parm of Start, Stop, and restart.

You can tailor your stuff to the same kind of logic.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top