• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is the difference in rc.local and rc3.d or rc5.d

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone tell me what is the differencd in putting the start script of an application like resin which is httpd.sh in rc.local or rc5.d or rc3.d to boot the application?
Any security or performance different?
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The difference isn't in security or performance, it's in when the script gets executed. Scripts in rc.local get run after the system initially boots up. Each of the numbered directories contains softflinks to files in the init.d directory. If your system was at runlevel 2 and you switched to runlevel 5 (using the command "/sbin/init 5"), all the scripts whose (alias) names begin with "K" in /etc/rc.d/rc2.d will be executed in the order of their filenames (which have execution priority encoded in them) and passed the parameter value "stop". Then all the scripts in /etc/rc.d/rc5.d whose (alias) names begin with "S" are executed in the order of their filenames and passed the parameter value "start".
TO see how the whole thing is put together, read the man page for the "init" program ("man init") and look at /etc/inittab. If your system is setup anything like mine, you'll see the lines where the script /etc/rc.d/rc is executed when a runlevel changes and looking at /etc/rc.d/rc will show you the rest of the process.
And just to round things out, I should mention that the naming scheme is "rc" for "Run Control" and the ".d" is a convention indicating that the item is a directory instead of a file.
[ February 27, 2002: Message edited by: Tim Holloway ]
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim,
Thanks for a wonderful explanation. Though I have been using "rc" I had ignored to get to know that it means run control.
Regards,
Keerthi
 
reply
    Bookmark Topic Watch Topic
  • New Topic