LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-11-2010, 11:55 PM   #1
forbin
Member
 
Registered: Apr 2010
Posts: 43

Rep: Reputation: 0
How to Add Routes Before Init Scripts?


Our system has a large number of init scripts (over 180). When we reboot it, we need it to be reachable over the network before all the init scripts load, so putting the routes in rc.local does not work. What's the best place to put the routes so that they get added as soon as possibe?
 
Old 08-12-2010, 01:36 AM   #2
jrosco
Member
 
Registered: Aug 2010
Location: Australia
Posts: 37

Rep: Reputation: 4
/etc/rc3.d

Lowest number runs first e.g

K35smb
K50snmpd

smb would ran before snmpd.

These are only soft link files linked to the scripts in /etc/init.d

You will need to create an init script and soft link it in /etc/rc3.d if your running run level 3, if you are running run level 5 the directory would be /etc/rc5.d

JC
 
Old 08-12-2010, 02:36 AM   #3
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Note the above, you may want to manually reconfigure/rename scripts within the correct run level, note that S means start and K means kill. the number is related to the boot order and should be a double figures value (so 0 should still be 00)

Make a copy of the directory BEFORE you edit things, they are only softlinks so it will not take up any real amount of space but if you break things it's an easy restore.

Quote:
Originally Posted by forbin View Post
Our system has a large number of init scripts (over 180). When we reboot it, we need it to be reachable over the network before all the init scripts load, so putting the routes in rc.local does not work. What's the best place to put the routes so that they get added as soon as possibe?
Putting things in Font size 5 with special fonts WILL NOT MAKE PEOPLE WANT TO RESPOND TO YOU!
 
Old 08-12-2010, 03:28 AM   #4
jrosco
Member
 
Registered: Aug 2010
Location: Australia
Posts: 37

Rep: Reputation: 4
Quote:
K35smb
K50snmpd
Sorry my bad

S35smb
S50snmpd
 
Old 08-13-2010, 11:30 AM   #5
forbin
Member
 
Registered: Apr 2010
Posts: 43

Original Poster
Rep: Reputation: 0
Good info, thanks. Interestingly, my system has 169 different scripts that begin with S80 (they start 169 different instances of Apache tomcat). There are 264 init scripts in all. Aside from the tomcat scripts (s80tomcat_001, s80tomcat_002, etc.) the other scripts all start with unique numbers. Any idea why the tomcat script all start with the same number?

r3sistance: I remember back in the late 80's when people use to get in big flame wars about top posting versus bottom posting on FIDONET (popular before many people even knew about USENET). At some point since then, I quit caring overly much about questionable points of netiquette. I posted in a large font point because it was a short question and like the way it looked better. So there. :-)

Last edited by forbin; 08-13-2010 at 11:31 AM.
 
  


Reply



Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Diffrence /etc/init.d and /etc/init.d/rc?.d scripts veeruhs Linux - Server 3 07-29-2010 04:42 AM
[SOLVED] init scripts, variables in INIT INFO section catkin Linux - General 1 08-18-2009 02:02 PM
Cannot add persistent routes janihemang Linux - Networking 2 08-05-2008 10:37 AM
add routes for good metallica1973 Linux - Networking 4 12-22-2005 05:34 PM
I'm not able to add new routes peter_mclein Linux - Networking 4 04-04-2005 09:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration