<?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: rc scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476125#M212573</link>
    <description>FWIW, I believe the S and K numbers are intended (but not required) to add up to 1000.  this will help them to start and stop in consistent order.  Note, for instance, the nfs scripts:&lt;BR /&gt;&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            23 Jan 21 18:41 rc1.d/K570nfs.client -&amp;gt; /sbin/init.d/nfs.client&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            21 Jan 21 18:41 rc1.d/K600nfs.core -&amp;gt; /sbin/init.d/nfs.core&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            23 Jan 21 18:41 rc2.d/K900nfs.server -&amp;gt; /sbin/init.d/nfs.server&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            21 Jan 21 18:41 rc2.d/S400nfs.core -&amp;gt; /sbin/init.d/nfs.core&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            23 Jan 21 18:41 rc2.d/S430nfs.client -&amp;gt; /sbin/init.d/nfs.client&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            23 Jan 21 18:41 rc3.d/S100nfs.server -&amp;gt; /sbin/init.d/nfs.server&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chuck Davis</description>
    <pubDate>Wed, 02 Feb 2005 12:59:43 GMT</pubDate>
    <dc:creator>Daryl Much</dc:creator>
    <dc:date>2005-02-02T12:59:43Z</dc:date>
    <item>
      <title>rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476118#M212566</link>
      <description>For links to scripts that are in the /sbin/rcx.d directories do the sequence numbers HAVE to be 3 digits.  Can they be 2 or 4 digits.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For instance /sbin/rc.d/S555webservices.  Can I use /sbin/rc.d/S55webservices or /sbin/rc.d/S555%.webservices</description>
      <pubDate>Tue, 01 Feb 2005 15:36:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476118#M212566</guid>
      <dc:creator>Tracey Hammer</dc:creator>
      <dc:date>2005-02-01T15:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476119#M212567</link>
      <description>The way of doing these is to keep them as S??? or K???&lt;BR /&gt;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&lt;BR /&gt;To quote from the file /usr/share/doc/start_up.txt:&lt;BR /&gt;&lt;BR /&gt;The /sbin/rc#.d (where # is a run-level [0..6]) directories are startup and shut&lt;BR /&gt;down sequencer directories. They contain only symbolic links to startup/shutdown&lt;BR /&gt; scripts in /sbin/init.d that are executed by /sbin/rc on transition to a specif&lt;BR /&gt;ic run level. For example, the /sbin/rc3.d directory contains symlinks to script&lt;BR /&gt;s that are executed when entering run level 3. (There is more information on /sb&lt;BR /&gt;in/rc in Section 2.4, "Run Levels and /sbin/rc").&lt;BR /&gt;These directories contain two types of link files: start links and kill links. S&lt;BR /&gt;tart links have names beginning with the capital letter "S" and are invoked with&lt;BR /&gt; the "start" argument at system boot time or on transition to a higher run level&lt;BR /&gt;. Kill links have names beginning with the capital letter "K" and are invoked wi&lt;BR /&gt;th the "stop" argument at system shutdown time, or when moving to a lower run le&lt;BR /&gt;vel.&lt;BR /&gt;Further, all link files in a sequencer directory are numbered to ensure a partic&lt;BR /&gt;ular execution sequence. Each script has, as part of its name, a three digit seq&lt;BR /&gt;uence number. This, in combination with the start and kill notation, provides al&lt;BR /&gt;l the information necessary to properly startup and shutdown a system.</description>
      <pubDate>Tue, 01 Feb 2005 15:43:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476119#M212567</guid>
      <dc:creator>melvyn burnard</dc:creator>
      <dc:date>2005-02-01T15:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476120#M212568</link>
      <description>Yeah the sequence number is a three digit number. Look for "man rc" &amp;amp; it has answer to your question.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Rajiv</description>
      <pubDate>Tue, 01 Feb 2005 15:45:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476120#M212568</guid>
      <dc:creator>Rajiv Singhal</dc:creator>
      <dc:date>2005-02-01T15:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476121#M212569</link>
      <description>from the manpage:&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.</description>
      <pubDate>Tue, 01 Feb 2005 15:47:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476121#M212569</guid>
      <dc:creator>Ken Penland_1</dc:creator>
      <dc:date>2005-02-01T15:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476122#M212570</link>
      <description>Yes, the numbers have to be three digits to maintain&lt;BR /&gt;the format and redability. If you want to use 55, then&lt;BR /&gt;use S055.&lt;BR /&gt;&lt;BR /&gt;Ofcourse, nothing will stop you if you use 2 digits, but&lt;BR /&gt;you shoud know that S55XXXX script will probably run&lt;BR /&gt;AFTER S500YYYY script.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Feb 2005 15:47:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476122#M212570</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-02-01T15:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476123#M212571</link>
      <description>ok, so in summary the 3 digit numbering system is for consistency but if its 2 digts or 4 digits that will not keep the script from working.  We have inherited some hp servers from another account and some of their customized scripts have 2 digits.  Thnx.</description>
      <pubDate>Tue, 01 Feb 2005 15:55:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476123#M212571</guid>
      <dc:creator>Tracey Hammer</dc:creator>
      <dc:date>2005-02-01T15:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476124#M212572</link>
      <description>Tracey-&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Best of luck.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;dl&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Feb 2005 16:32:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476124#M212572</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2005-02-01T16:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476125#M212573</link>
      <description>FWIW, I believe the S and K numbers are intended (but not required) to add up to 1000.  this will help them to start and stop in consistent order.  Note, for instance, the nfs scripts:&lt;BR /&gt;&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            23 Jan 21 18:41 rc1.d/K570nfs.client -&amp;gt; /sbin/init.d/nfs.client&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            21 Jan 21 18:41 rc1.d/K600nfs.core -&amp;gt; /sbin/init.d/nfs.core&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            23 Jan 21 18:41 rc2.d/K900nfs.server -&amp;gt; /sbin/init.d/nfs.server&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            21 Jan 21 18:41 rc2.d/S400nfs.core -&amp;gt; /sbin/init.d/nfs.core&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            23 Jan 21 18:41 rc2.d/S430nfs.client -&amp;gt; /sbin/init.d/nfs.client&lt;BR /&gt;   0 lrwxr-xr-x   1 root       root            23 Jan 21 18:41 rc3.d/S100nfs.server -&amp;gt; /sbin/init.d/nfs.server&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chuck Davis</description>
      <pubDate>Wed, 02 Feb 2005 12:59:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476125#M212573</guid>
      <dc:creator>Daryl Much</dc:creator>
      <dc:date>2005-02-02T12:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476126#M212574</link>
      <description>The process is controlled out of /etc/rc and /etc/rc.utils.&lt;BR /&gt;&lt;BR /&gt;Here's the portion that creates (for instance) the start list:&lt;BR /&gt;&lt;BR /&gt; while [ $lvl -le "$new" ]; do&lt;BR /&gt;                get_scripts $lvl S |&lt;BR /&gt;                while read name descrip; do&lt;BR /&gt;                    if [ -s "$name" ]; then&lt;BR /&gt;                        add_list "$name start" "$descrip"&lt;BR /&gt;                        found=1&lt;BR /&gt;                    fi&lt;BR /&gt;&lt;BR /&gt;Note that its adding "$name start" to the list of things to run.&lt;BR /&gt;&lt;BR /&gt;The reading from get_scripts is output from the following:&lt;BR /&gt;&lt;BR /&gt;get_scripts() {&lt;BR /&gt;        state=$1&lt;BR /&gt;        mode=$2&lt;BR /&gt;        dir=/sbin/rc${state}.d&lt;BR /&gt;        # Fix for DSDe444244:&lt;BR /&gt;        # Use of unspecified \ls\ in /sbin/rc can cause rc script failure&lt;BR /&gt;        # ls has been replaced with /sbin/ls&lt;BR /&gt;        /sbin/ls $dir 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;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' .&lt;BR /&gt;&lt;BR /&gt;So I guess you could even do something like:&lt;BR /&gt;&lt;BR /&gt;Sa_MyCommand&lt;BR /&gt;&lt;BR /&gt;and it would work.  &lt;BR /&gt;&lt;BR /&gt;It would just sort it to wherever "Sa" would fall amongst such things as s0100&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Oz&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Feb 2005 13:55:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476126#M212574</guid>
      <dc:creator>Kent Ostby</dc:creator>
      <dc:date>2005-02-02T13:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476127#M212575</link>
      <description>You are perfectly free to do whatever you like as long as the names begin with 'S' or 'K' BUT you should be aware on the consequences. THe files are processed in lexical order, so, for eaxample S100xxx, S200xxx, S499xxx will be processed before S55xxx. This is the significance of the leading zeroes. It is also perfectly legal to have multiple S055 but not necessarily wise. If your daemons and other processes depend upon other services (e.g. NFS being available) then the ordering matters a great deal. BY CONVENTION, if the service starts at run-level N then it should be halted at run-level N - 1. BY CONVENTION, the KNNNxxx values + the Snnnxxx values should add to 1000 because this tends to correctly order the startup/halt sequences. For example in rc2.d you might have K050mystuff which would be linked to rc3.d/S950mystuff.&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Feb 2005 17:02:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476127#M212575</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-02-02T17:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476128#M212576</link>
      <description>Hi Tracey,&lt;BR /&gt;&lt;BR /&gt;As additional please take a look of my attachment pdf.&lt;BR /&gt;&lt;BR /&gt;Good Luck</description>
      <pubDate>Thu, 03 Feb 2005 09:34:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts/m-p/3476128#M212576</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-02-03T09:34:27Z</dc:date>
    </item>
  </channel>
</rss>

