linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* significance of 2 digit number in rc.d directory.
@ 2002-06-05 10:53 Mohammed Khalid Ansari
  2002-06-05 11:02 ` John Hallam
  2002-06-05 17:49 ` rich+ml
  0 siblings, 2 replies; 5+ messages in thread
From: Mohammed Khalid Ansari @ 2002-06-05 10:53 UTC (permalink / raw)
  To: linux-admin


I have seen that the files in rc.d directory starting with either S or K
are followed by two digit number. I understand that S stands for start and
K for kill but what is the significance of the numbers that followed.

Any idea?

-- 

**************************************************************************

Mohammed Khalid Ansari                    Tel (res) : 0091-022-3051360
Assistant Manager II                          (off) : 0091-022-2024641
National Centre for Software Technology   Fax       : 0091-022-2049573 
8th flr,Air India Build. Nariman Point,   E-Mail    : khalid@ncst.ernet.in 	
Mumbai 400021.

Homepage : http://soochak.ncst.ernet.in/~khalid			  	  

**************************************************************************


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: significance of 2 digit number in rc.d directory.
  2002-06-05 10:53 significance of 2 digit number in rc.d directory Mohammed Khalid Ansari
@ 2002-06-05 11:02 ` John Hallam
  2002-06-05 17:49 ` rich+ml
  1 sibling, 0 replies; 5+ messages in thread
From: John Hallam @ 2002-06-05 11:02 UTC (permalink / raw)
  To: Mohammed Khalid Ansari; +Cc: linux-admin

They are there so that things are done in the right order.  For example, a
file S23job will be executed at boot time by the init procedure (usually
implemented in /etc/rc) before a file S81otherjob.  Thus, more fundamental
services can be started first by giving them a pair of digits specifying a
lower number.

If you look at the actual files in the rc.? directories you should find
that they are symbolic links to the scripts in the rc.d/init.d directory
which are responsible for actually starting and stopping services.  All
this is maintained using the chkconfig command -- have a look at its
manual page -- if your distribution has it or by one of the GUI init
manager programs.

	John.

On Wed, 5 Jun 2002, Mohammed Khalid Ansari wrote:

>
> I have seen that the files in rc.d directory starting with either S or K
> are followed by two digit number. I understand that S stands for start and
> K for kill but what is the significance of the numbers that followed.
>
> Any idea?
>
> --
>
> **************************************************************************
>
> Mohammed Khalid Ansari                    Tel (res) : 0091-022-3051360
> Assistant Manager II                          (off) : 0091-022-2024641
> National Centre for Software Technology   Fax       : 0091-022-2049573
> 8th flr,Air India Build. Nariman Point,   E-Mail    : khalid@ncst.ernet.in
> Mumbai 400021.
>
> Homepage : http://soochak.ncst.ernet.in/~khalid
>
> **************************************************************************
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: significance of 2 digit number in rc.d directory.
  2002-06-05 10:53 significance of 2 digit number in rc.d directory Mohammed Khalid Ansari
  2002-06-05 11:02 ` John Hallam
@ 2002-06-05 17:49 ` rich+ml
  2002-06-06  2:56   ` Bruce Ferrell
  1 sibling, 1 reply; 5+ messages in thread
From: rich+ml @ 2002-06-05 17:49 UTC (permalink / raw)
  To: Mohammed Khalid Ansari; +Cc: linux-admin

There really is no significance. The scripts are executed in alphabetical
order (somebody does "for script in S*; do exec $script start; done"), and
the two digit sequence is a typographical convention to make it easy to
manage that order.

== Rich 

On Wed, 5 Jun 2002, Mohammed Khalid Ansari wrote:

> Date: Wed, 5 Jun 2002 16:23:25 +0530 (IST)
> From: Mohammed Khalid Ansari <khalid@ncst.ernet.in>
> To: linux-admin <linux-admin@vger.kernel.org>
> Subject: significance of 2 digit number in rc.d directory.
> 
> 
> I have seen that the files in rc.d directory starting with either S or K
> are followed by two digit number. I understand that S stands for start and
> K for kill but what is the significance of the numbers that followed.
> 
> Any idea?
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: significance of 2 digit number in rc.d directory.
  2002-06-05 17:49 ` rich+ml
@ 2002-06-06  2:56   ` Bruce Ferrell
  2002-06-06  6:44     ` Michael Salmon
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Ferrell @ 2002-06-06  2:56 UTC (permalink / raw)
  To: rich+ml; +Cc: Mohammed Khalid Ansari, linux-admin

I was under the impression that the scripts executed in numerical order. 
  They do under Solaris anyway


rich+ml@lclogic.com wrote:

> There really is no significance. The scripts are executed in alphabetical
> order (somebody does "for script in S*; do exec $script start; done"), and
> the two digit sequence is a typographical convention to make it easy to
> manage that order.
> 
> == Rich 
> 
> On Wed, 5 Jun 2002, Mohammed Khalid Ansari wrote:
> 
> 
>>Date: Wed, 5 Jun 2002 16:23:25 +0530 (IST)
>>From: Mohammed Khalid Ansari <khalid@ncst.ernet.in>
>>To: linux-admin <linux-admin@vger.kernel.org>
>>Subject: significance of 2 digit number in rc.d directory.
>>
>>
>>I have seen that the files in rc.d directory starting with either S or K
>>are followed by two digit number. I understand that S stands for start and
>>K for kill but what is the significance of the numbers that followed.
>>
>>Any idea?
>>
>>
>>
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: significance of 2 digit number in rc.d directory.
  2002-06-06  2:56   ` Bruce Ferrell
@ 2002-06-06  6:44     ` Michael Salmon
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Salmon @ 2002-06-06  6:44 UTC (permalink / raw)
  To: linux-admin

On Wednesday, June 05, 2002 07:56:09 PM -0700 Bruce Ferrell 
<bferrell@baywinds.org> wrote:
+------
| I was under the impression that the scripts executed in numerical order.
| They do under Solaris anyway
|
| rich+ml@lclogic.com wrote:
|
| > There really is no significance. The scripts are executed in
| > alphabetical order (somebody does "for script in S*; do exec $script
| > start; done"), and the two digit sequence is a typographical convention
| > to make it easy to manage that order.
| >
| > == Rich
| >
| > On Wed, 5 Jun 2002, Mohammed Khalid Ansari wrote:
|
| >> I have seen that the files in rc.d directory starting with either S or
| >> K are followed by two digit number. I understand that S stands for
| >> start and K for kill but what is the significance of the numbers that
| >> followed.
+-----X8

Sorry but in Solaris they execute in ascii order, the code that executes 
them is:

for f in /etc/rc0.d/S*
do
  if [ -s $f ]
  then
    case $f in
      *.sh)   . $f ;;
      *)      /sbin/sh $f start ;;
    esac
  fi
done

The fact that there are usually 2 digits after the S is purely a convention.

/Michael
--
This space intentionally left non-blank.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-06-06  6:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-05 10:53 significance of 2 digit number in rc.d directory Mohammed Khalid Ansari
2002-06-05 11:02 ` John Hallam
2002-06-05 17:49 ` rich+ml
2002-06-06  2:56   ` Bruce Ferrell
2002-06-06  6:44     ` Michael Salmon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).