- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- rc scripts
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 07:36 AM
02-01-2005 07:36 AM
rc scripts
For instance /sbin/rc.d/S555webservices. Can I use /sbin/rc.d/S55webservices or /sbin/rc.d/S555%.webservices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 07:43 AM
02-01-2005 07:43 AM
Re: rc scripts
This is due to the way they are sorted to be run. If you do want it to run as S/K55, then add in the leading 0
To quote from the file /usr/share/doc/start_up.txt:
The /sbin/rc#.d (where # is a run-level [0..6]) directories are startup and shut
down sequencer directories. They contain only symbolic links to startup/shutdown
scripts in /sbin/init.d that are executed by /sbin/rc on transition to a specif
ic run level. For example, the /sbin/rc3.d directory contains symlinks to script
s that are executed when entering run level 3. (There is more information on /sb
in/rc in Section 2.4, "Run Levels and /sbin/rc").
These directories contain two types of link files: start links and kill links. S
tart links have names beginning with the capital letter "S" and are invoked with
the "start" argument at system boot time or on transition to a higher run level
. Kill links have names beginning with the capital letter "K" and are invoked wi
th the "stop" argument at system shutdown time, or when moving to a lower run le
vel.
Further, all link files in a sequencer directory are numbered to ensure a partic
ular execution sequence. Each script has, as part of its name, a three digit seq
uence number. This, in combination with the start and kill notation, provides al
l the information necessary to properly startup and shutdown a system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 07:45 AM
02-01-2005 07:45 AM
Re: rc scripts
Thanks
Rajiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 07:47 AM
02-01-2005 07:47 AM
Re: rc scripts
A three digit number is used for sequencing scripts within the sequencer directory. Scripts are executed by type (start or kill) in alphabetical order as defined by the shell. Although it is not recommended, two scripts may share the same sequence number.
So it is recommended to use three numbers, though I have seen instances where two numbers were used and it still works, I think three is standard to simplify sorting out which script gets run first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 07:47 AM
02-01-2005 07:47 AM
Re: rc scripts
the format and redability. If you want to use 55, then
use S055.
Ofcourse, nothing will stop you if you use 2 digits, but
you shoud know that S55XXXX script will probably run
AFTER S500YYYY script.
- Biswajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 07:55 AM
02-01-2005 07:55 AM
Re: rc scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2005 08:32 AM
02-01-2005 08:32 AM
Re: rc scripts
I can sympathize with your inheritance. Now if you want to "standardize", attached is the doc I have used many times. You'll find it has test scenarios for you to try after your modifications. It was written during the 10.X era but I have been using it for on 11.X startups as well.
Best of luck.
regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2005 04:59 AM
02-02-2005 04:59 AM
Re: rc scripts
0 lrwxr-xr-x 1 root root 23 Jan 21 18:41 rc1.d/K570nfs.client -> /sbin/init.d/nfs.client
0 lrwxr-xr-x 1 root root 21 Jan 21 18:41 rc1.d/K600nfs.core -> /sbin/init.d/nfs.core
0 lrwxr-xr-x 1 root root 23 Jan 21 18:41 rc2.d/K900nfs.server -> /sbin/init.d/nfs.server
0 lrwxr-xr-x 1 root root 21 Jan 21 18:41 rc2.d/S400nfs.core -> /sbin/init.d/nfs.core
0 lrwxr-xr-x 1 root root 23 Jan 21 18:41 rc2.d/S430nfs.client -> /sbin/init.d/nfs.client
0 lrwxr-xr-x 1 root root 23 Jan 21 18:41 rc3.d/S100nfs.server -> /sbin/init.d/nfs.server
Chuck Davis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2005 05:55 AM
02-02-2005 05:55 AM
Re: rc scripts
Here's the portion that creates (for instance) the start list:
while [ $lvl -le "$new" ]; do
get_scripts $lvl S |
while read name descrip; do
if [ -s "$name" ]; then
add_list "$name start" "$descrip"
found=1
fi
Note that its adding "$name start" to the list of things to run.
The reading from get_scripts is output from the following:
get_scripts() {
state=$1
mode=$2
dir=/sbin/rc${state}.d
# Fix for DSDe444244:
# Use of unspecified \ls\ in /sbin/rc can cause rc script failure
# ls has been replaced with /sbin/ls
/sbin/ls $dir 2>/dev/null
So the only limitation on the name is that it must start with an "S" or "K" and that it will be returned in order of the 'ls' .
So I guess you could even do something like:
Sa_MyCommand
and it would work.
It would just sort it to wherever "Sa" would fall amongst such things as s0100
Best regards,
Oz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2005 09:02 AM
02-02-2005 09:02 AM
Re: rc scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2005 01:34 AM
02-03-2005 01:34 AM
Re: rc scripts
As additional please take a look of my attachment pdf.
Good Luck