Hello everyone
As you know Linux stores startup commands in files with (rc ) in the name,using the old Unix convention.
if we take a look in one of the /etc/rcN.d(specially in SuSE and debian ...)directories; we will see a number of filenames of the form Snnxxx or Knnxxx where nn is a number from 00 to 99,and they are used to enforced an executed:scripts with lower numbers are executed befor those with higher numbers and if we take a look at the rc script we can see it obviously how this happen:
...
# First, run the KILL scripts.
if [ $previous != N ]
then
for i in /etc/rc$runlevel.d/K[0-9][0-9]*
do
# Check if the script is there.
[ ! -f $i ] && continue

# Stop the service.
startup $i stop
done
fi
# Now run the START scripts for this runlevel.
....
but I found that some filenames in /etc/rcN.d have the same number
/etc/rc6.d (for example)
... K20logoutd ...
... K20makedev ...
... K20samba ...
now the question is :
there are 100 number to use ,but why should some files have the same number? which one will start first?