<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: about scripts in /etc/rc.d in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228053#M73617</link>
    <description>L.S.&lt;BR /&gt;&lt;BR /&gt;As already said by other, the numbers determine the executing sequence of the scripts in the rcn.d directory. The 'n' is the runlevel (RedHat: 3 multi user, 5: Graphical multiuser). See /etc/inittab.&lt;BR /&gt;&lt;BR /&gt;An easier way of maintaining all these softlinks is using chkconfig.&lt;BR /&gt;chkconfig -add service&lt;BR /&gt;chkconfig service on&lt;BR /&gt;chkconfig --list service&lt;BR /&gt;&lt;BR /&gt;Check the manpage.&lt;BR /&gt;A commentline in your script may be needed. Check other scripts in /etc/init.d for an example.&lt;BR /&gt;&lt;BR /&gt;JP.</description>
    <pubDate>Wed, 24 Mar 2004 10:01:45 GMT</pubDate>
    <dc:creator>Jeroen Peereboom</dc:creator>
    <dc:date>2004-03-24T10:01:45Z</dc:date>
    <item>
      <title>about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228046#M73610</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I like to know what is the significance of numbers in front of the softlinks in /etc/rc.d/rc3.d or rc6.d or...&lt;BR /&gt;&lt;BR /&gt;The S indicates 'start' and K indicates 'kill'.&lt;BR /&gt;But what for the number?&lt;BR /&gt;&lt;BR /&gt;For example I have seen S85httpd in rc3.d dir.&lt;BR /&gt;The number 85 stands for what?&lt;BR /&gt;&lt;BR /&gt;Please brief&lt;BR /&gt;&lt;BR /&gt;thanks in advance&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2004 06:08:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228046#M73610</guid>
      <dc:creator>Deepa_4</dc:creator>
      <dc:date>2004-03-24T06:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228047#M73611</link>
      <description>S85something will start before S86something&lt;BR /&gt;and that's the whole trick.&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2004 06:35:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228047#M73611</guid>
      <dc:creator>Alexander Chuzhoy</dc:creator>
      <dc:date>2004-03-24T06:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228048#M73612</link>
      <description>Yep, they don't have to be numbers.  At least on your average Linux box they don't. Some systems don't even run them numerically but alphabetically which can get things in the worng order at times.  If you want to see exactly what happens, have a look at /etc/rc.  This is the "real" unix start up script but nowadays, generally runs things in the rc.* directories.</description>
      <pubDate>Wed, 24 Mar 2004 06:45:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228048#M73612</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-03-24T06:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228049#M73613</link>
      <description>&lt;A href="http://docs.sun.com/db/doc/805-7228/6j6q7uepi?a=view" target="_blank"&gt;http://docs.sun.com/db/doc/805-7228/6j6q7uepi?a=view&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;They have explained everything neatly in the above link .. (who cares if it is a SUN site as long as the information provided applies to HP-UX aswell .. well it applies more or less)&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Wed, 24 Mar 2004 06:56:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228049#M73613</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2004-03-24T06:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228050#M73614</link>
      <description>What exactly i want to know is:&lt;BR /&gt;&lt;BR /&gt;I will be writing a script that should be called when reboot is given. So i will have a soft link to my script in /etc/rc.d/rc6.d directory.&lt;BR /&gt;&lt;BR /&gt;I have seen all the file are having some numbers. see below:&lt;BR /&gt;&lt;BR /&gt;K05news -&amp;gt; ../init.d/news&lt;BR /&gt;K08iBCS -&amp;gt; ../init.d/iBCS&lt;BR /&gt;K09samba -&amp;gt; ../init.d/samba&lt;BR /&gt;K12squid -&amp;gt; ../init.d/squid&lt;BR /&gt;K25gpm -&amp;gt; ../init.d/gpm&lt;BR /&gt;K25httpd -&amp;gt; ../init.d/httpd&lt;BR /&gt;K55snmpd -&amp;gt; ../init.d/snmpd&lt;BR /&gt;S99reboot -&amp;gt; ../init.d/reboot&lt;BR /&gt;&lt;BR /&gt;I will be giving name of my script link which will start with 'S' . But what number I have to assign?&lt;BR /&gt;&lt;BR /&gt;Is there any order these scripts should be called based on the numbers?&lt;BR /&gt;&lt;BR /&gt;thank you</description>
      <pubDate>Wed, 24 Mar 2004 06:57:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228050#M73614</guid>
      <dc:creator>Deepa_4</dc:creator>
      <dc:date>2004-03-24T06:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228051#M73615</link>
      <description>Deepa,&lt;BR /&gt;&lt;BR /&gt;If you want a script to be invoked upon reboot then you must name it starting with the character 'K' and place it in /etc/rc.d/rc6.d directory. You can give it any number but unique one.&lt;BR /&gt;&lt;BR /&gt;ex:&lt;BR /&gt;K77your_script &lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Wed, 24 Mar 2004 07:10:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228051#M73615</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2004-03-24T07:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228052#M73616</link>
      <description>init level 1,2,3 ...&lt;BR /&gt;if you have Snnxxx in rc2.d you will/should have Kmmxxx in rc1.d&lt;BR /&gt;&lt;BR /&gt;The rule is mm + nn = 1000&lt;BR /&gt;&lt;BR /&gt;The order is taken by this number , Therefore the last started daemons are killed first.&lt;BR /&gt; &lt;BR /&gt;Jean-Luc</description>
      <pubDate>Wed, 24 Mar 2004 08:29:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228052#M73616</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2004-03-24T08:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228053#M73617</link>
      <description>L.S.&lt;BR /&gt;&lt;BR /&gt;As already said by other, the numbers determine the executing sequence of the scripts in the rcn.d directory. The 'n' is the runlevel (RedHat: 3 multi user, 5: Graphical multiuser). See /etc/inittab.&lt;BR /&gt;&lt;BR /&gt;An easier way of maintaining all these softlinks is using chkconfig.&lt;BR /&gt;chkconfig -add service&lt;BR /&gt;chkconfig service on&lt;BR /&gt;chkconfig --list service&lt;BR /&gt;&lt;BR /&gt;Check the manpage.&lt;BR /&gt;A commentline in your script may be needed. Check other scripts in /etc/init.d for an example.&lt;BR /&gt;&lt;BR /&gt;JP.</description>
      <pubDate>Wed, 24 Mar 2004 10:01:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228053#M73617</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2004-03-24T10:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228054#M73618</link>
      <description>The thing you want to keep in mind is the prerequisits that your script needs. Lets say it still needs the network, so you have to select a number higher than used for the network start/stop script.&lt;BR /&gt;&lt;BR /&gt;Greetings, Martin</description>
      <pubDate>Wed, 24 Mar 2004 11:48:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228054#M73618</guid>
      <dc:creator>Martin P.J. Zinser</dc:creator>
      <dc:date>2004-03-24T11:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228055#M73619</link>
      <description>And you can symlink your K01blah and S01blah to the same script. &lt;BR /&gt;&lt;BR /&gt;The K01blah symlink will be called with "stop" argument and the S01blah will be called with "start" argument</description>
      <pubDate>Wed, 24 Mar 2004 15:59:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228055#M73619</guid>
      <dc:creator>Olivier Drouin</dc:creator>
      <dc:date>2004-03-24T15:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228056#M73620</link>
      <description>For the record, the number doesn't have to be unique.&lt;BR /&gt;&lt;BR /&gt;Simply, /etc/rc.d/rc gets called by 'init', and does simple loops like:&lt;BR /&gt;&lt;BR /&gt;for i in /etc/rc.d/rc6.d/K*&lt;BR /&gt;do&lt;BR /&gt;  $i stop&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;(NOTE: On RH, it literally *IS* "for i in"!)&lt;BR /&gt;&lt;BR /&gt;The numbers give the basic order of execution.  All you really need to take into account is that your process is started after it's required subsystems are started, and stopped before it's required subsystems are stopped.&lt;BR /&gt;&lt;BR /&gt;Usually this means you have a high S value (for rc 2/3/4/5), and a low K value (for rc 0/6).&lt;BR /&gt;&lt;BR /&gt;As was said in the previous post, the values for S and K should add up to 100, but that isn't a 'rule', it's just a good guideline for keeping the start-up/shut-down orders equivalent.&lt;BR /&gt;&lt;BR /&gt;Also note, that the order numbers are *ALWAYS* zero padded, i.e.:&lt;BR /&gt;&lt;BR /&gt;S99MyRoutine&lt;BR /&gt;K01MyRoutine&lt;BR /&gt;&lt;BR /&gt;To get an idea what order the start/stop will occur in, simply issue:&lt;BR /&gt;&lt;BR /&gt;echo /etc/rc.d/rc3.d/S*&lt;BR /&gt;&lt;BR /&gt;This will show the order they'll be executed in.</description>
      <pubDate>Wed, 24 Mar 2004 17:58:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228056#M73620</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2004-03-24T17:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: about scripts in /etc/rc.d</title>
      <link>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228057#M73621</link>
      <description>thanks for all. So clear.&lt;BR /&gt;&lt;BR /&gt;Deepa&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Mar 2004 04:08:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/about-scripts-in-etc-rc-d/m-p/3228057#M73621</guid>
      <dc:creator>Deepa_4</dc:creator>
      <dc:date>2004-03-25T04:08:00Z</dc:date>
    </item>
  </channel>
</rss>

