From the computer of: qmchenry
(337 recipes)
Created: Oct 03, 2003 Updated: Oct 11, 2004
Well written runtime control scripts should accept at least start and stop as runtime parameters and may optionally accept additional parameters such as restart and status. When a runtime control script runs with a start parameter, it starts the processes for which it is responsible. Likewise, the stop parameter causes the script to terminate those processes.
Inside the runtime control directories are a numer of runtime control scripts starting with uppercase K or S followed by two numbers. As the system changes its run level, scripts in the corresponding directory are run in sorted order so a script starting with K00 will run before K99 which will run before S00. A script starting with the letter K is a kill script and will be run with a stop parameter and S scripts will be run with a start parameter. In this manner, the same script can be used to start and stop processes.
It is common to place a generic script, newservice for example, in /etc/init.d and then create logical links to that script in the appropriate rc#.d directory preceeded with a suitable combination of K or S and number. For example, to create an early kill script in rc0.d for an rc script newservice located in /etc/init.d, run as superuser:
When you shutdown or restart the system you change its run level to 6 or 5, respectively. There are no /etc/rc5.d or /etc/rc6.d directories. Since changing to run level 0 (openboot prompt) involves the same procedure as shutting down or restarting, run levels 5 and 6 share the /etc/rc0.d directory. It is important to include kill scripts for services such as databases that could be corrupted if they were not properly shut down .
For an example of a runtime control script, see the recipe Create a basic Solaris runtime control script
Subscribe to the Tech-Recipes Newsletter
You can get tips like this delivered in your email every week!
We will never, ever sell your email address or spam you.
2 Recipe comments: View comments
Understanding Solaris runtime control scripts by Anonymous
Re: Understanding Solaris runtime control scripts by qmchenry
Related recipes:
Create a basic Solaris runtime control script
Set the ethernet MAC address in Solaris
Prevent Solaris core files creation with coreadm
Configure Solaris for DNS resolution of hostnames
Solaris 10: connect or login to zone console
Change BootPROM settings from the Solaris command line
Change Solaris DNS client settings
Solaris 10: shutdown or stop a zone
Solaris Processor Info
Solaris 10: enable NFS server
Sponsored links
Login
Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.Search
Tech Recipes
· Home
· Mac OS X
· Solaris
· Windows
· Programming
· UNIX
· Cisco
· MySQL
· Google
· Instant messaging
· Add recipes
· Leave feedback
· Recommend us
· RSS Syndication
Hot recipes
Make XP look like Windows Vista / Longhorn for free!
XP: Small, Free Way to Use and Mount Images (ISO files) Without Burning Them
Hacks to Beat Rapidshare Download Limits and Waiting Time
How Do I Use or Open Bin, Cue, or ISO Files?
Vista: Should I Install 64-bit or 32-bit Version? (x64 vs x86)
XP: kill a Windows process from the command line with taskkill
MySpace: Hack to Download Any Song on MySpace
How to patch up your UXtheme.dll file in XP home or pro
Who's Online
There are currently, 2427 guest(s) and 1 member(s) that are online.
You are Anonymous user. You can register for free by clicking here
Information
Wish to advertise with us?
All logos and trademarks in this site are property of their respective owner. The comments and forum posts are property of their posters, all the rest © 2003-2007 by QD Ideas, LLC.
Users of this site are legally bound by the Terms and conditions and Disclaimer. Do not use this web site if you do not agree with these policies.
The members, admins, and authors of this website respect your privacy.
Page Generation: 1.05 Seconds
Fri Jul 4 6:10:28 2008