<?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: Custom Start/Kill Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600138#M593256</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I'd like to reinforce one key point about startup/shutdown order and the '1000' guideline.&lt;BR /&gt;&lt;BR /&gt;First, if a start script is place in directory '/sbin/rc{X}.d' then its corresponding kill script is put in directory '/sbin/rc{X-1}.d' &lt;BR /&gt;&lt;BR /&gt;A general rule-of-thumb is that the sequence number of the start script plus the sequence number of the kill script should add to 1000. &lt;BR /&gt;&lt;BR /&gt;Also, choose the appropriate rc&lt;N&gt;.d directory -- one (1) is for core services; two (2) is for multiuser run-state; three (3) is for networked, multi-user; and four (4) is for graphical interfaces. Depending on the processes you are starting, or stopping, you want to make sure prerequisite services exist. &lt;BR /&gt;&lt;BR /&gt;Subsystems should be killed in the opposite order they were started. This implies that kill scripts will generally not have the same numbers as their start script counterparts. If two subsystems must be started in a given order due to dependencies (e.g., S200sys1 followed by S300uses_sys1), the counterparts to these scripts must be numbered so that the subsystems are stopped in the opposite order in which they were started (e.g., K700uses_sys1 followed by K800sys1).  The '1000' rule leads to this behavior. &lt;BR /&gt;&lt;BR /&gt;If you can't find the document file that Melvyn suggested you read, it is present here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/hpux/onlinedocs/os/startup.html" target="_blank"&gt;http://docs.hp.com/hpux/onlinedocs/os/startup.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The document is a easy reading and will answer all of your questions.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;/N&gt;</description>
    <pubDate>Wed, 24 Oct 2001 09:03:22 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2001-10-24T09:03:22Z</dc:date>
    <item>
      <title>Custom Start/Kill Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600129#M593247</link>
      <description>Hi all,&lt;BR /&gt;  I would like to start a 3rd party application at rc3. I've custom a S/K script for the application. However, I'm doubtful of whether I could simply put any unique sequence number for the script or there is any rules for this?&lt;BR /&gt;  Thanks in advanced.</description>
      <pubDate>Tue, 23 Oct 2001 23:47:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600129#M593247</guid>
      <dc:creator>Hill_1</dc:creator>
      <dc:date>2001-10-23T23:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Start/Kill Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600130#M593248</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;THe answer is yes you can. If anything in your start script depends upon some other service begin started first at run-level 3 then simply make sure that your S filename comes later in lexical order. It is perfectly acceptable to have S209mycode and S209yourcode. S209mycode is first in lexical order so that it runs before S209yourcode. The standard convention is that the 'S' value + the 'K' value = 1000. That is not a requirement but it does tend to correctly order the start/stop. In this example you should have /sbin/rc3.d/S209yourcode and /sbin/rc2.d/K791yourcode. Of course, both of these should be symbolically linked to /sbin/init.d/yourcode.&lt;BR /&gt;&lt;BR /&gt;The other convention is that there should be a file /etc/rc.config.d/yourcode which contains any variables and usually a 1 or 0 value to indicate whether the script should run at all.&lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Tue, 23 Oct 2001 23:58:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600130#M593248</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-10-23T23:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Start/Kill Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600131#M593249</link>
      <description>Yes they are sorted in order. so S400 starts before S401.</description>
      <pubDate>Wed, 24 Oct 2001 00:00:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600131#M593249</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-10-24T00:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Start/Kill Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600132#M593250</link>
      <description>By convension, the "don't care" start and kill numbers are:&lt;BR /&gt;&lt;BR /&gt;Start - S900&lt;NAME&gt;&lt;BR /&gt;Kill  - K100&lt;NAME&gt;&lt;/NAME&gt;&lt;/NAME&gt;</description>
      <pubDate>Wed, 24 Oct 2001 02:08:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600132#M593250</guid>
      <dc:creator>Tom Danzig</dc:creator>
      <dc:date>2001-10-24T02:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Start/Kill Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600133#M593251</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can assign numbers and a name as you wish but make sure that if you need something to be started before your application, put your application lexically 'after' the 'something'. Also, if another service needs your app, make sure your app starts before it.&lt;BR /&gt;&lt;BR /&gt;E.</description>
      <pubDate>Wed, 24 Oct 2001 05:34:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600133#M593251</guid>
      <dc:creator>Eugen Cocalea</dc:creator>
      <dc:date>2001-10-24T05:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Start/Kill Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600134#M593252</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can assign any numbers that you wish to&lt;BR /&gt;use, however in saying that you may have &lt;BR /&gt;some dependancy with your application in &lt;BR /&gt;that perhaps your databases need to be &lt;BR /&gt;started first, in which case use a higher&lt;BR /&gt;number that your database to start and &lt;BR /&gt;a lower one to stop. You could start with&lt;BR /&gt;say S991startapp in rc3.d and K009stop in &lt;BR /&gt;rc2.d. The numbers when used should &lt;BR /&gt;generally add up to 1000.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;-Michael</description>
      <pubDate>Wed, 24 Oct 2001 05:51:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600134#M593252</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2001-10-24T05:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Start/Kill Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600135#M593253</link>
      <description>Take a read of /usr/share/docs/start_up.txt on your system. this explains it all.</description>
      <pubDate>Wed, 24 Oct 2001 06:22:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600135#M593253</guid>
      <dc:creator>melvyn burnard</dc:creator>
      <dc:date>2001-10-24T06:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Start/Kill Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600136#M593254</link>
      <description>Those numbers are like good old BASIC programming on Apple or C64 !&lt;BR /&gt;&lt;BR /&gt;Be sure to keep enough gaps, or sooner or later, you need to rename everything to insert something additional :-)&lt;BR /&gt;&lt;BR /&gt;Beside this there are no rules, just the mentioned recommendations.&lt;BR /&gt;&lt;BR /&gt;Volker</description>
      <pubDate>Wed, 24 Oct 2001 06:23:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600136#M593254</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2001-10-24T06:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Start/Kill Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600137#M593255</link>
      <description>Just make sure that the numbers that you choose are unique.  Although this isn't an absolute requirement, it does make it easier to see the order in which things get done.&lt;BR /&gt;&lt;BR /&gt;That said, typically the startup/kill scripts are both one script located in /sbin/init.d with symbolic links to the approprate run levels for startup and kill, i.e. if I have a script called oracle, then the setup would be something like this:&lt;BR /&gt;&lt;BR /&gt;/sbin/init.d/oracle&lt;BR /&gt;/sbin/rc2.d/K999oracle -&amp;gt;/sbin/init.d/oracle&lt;BR /&gt;/sbin/rc3.d/S999oracle -&amp;gt; /sbin/init.d/oracle&lt;BR /&gt;&lt;BR /&gt;Also, the script should have startmsg and stopmsg funtions.  These are the messages that it display on the console screen when starting/killing the processes.  Take a look at /sbin/init.d/template for more details.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
      <pubDate>Wed, 24 Oct 2001 08:24:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600137#M593255</guid>
      <dc:creator>Santosh Nair_1</dc:creator>
      <dc:date>2001-10-24T08:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Start/Kill Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600138#M593256</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I'd like to reinforce one key point about startup/shutdown order and the '1000' guideline.&lt;BR /&gt;&lt;BR /&gt;First, if a start script is place in directory '/sbin/rc{X}.d' then its corresponding kill script is put in directory '/sbin/rc{X-1}.d' &lt;BR /&gt;&lt;BR /&gt;A general rule-of-thumb is that the sequence number of the start script plus the sequence number of the kill script should add to 1000. &lt;BR /&gt;&lt;BR /&gt;Also, choose the appropriate rc&lt;N&gt;.d directory -- one (1) is for core services; two (2) is for multiuser run-state; three (3) is for networked, multi-user; and four (4) is for graphical interfaces. Depending on the processes you are starting, or stopping, you want to make sure prerequisite services exist. &lt;BR /&gt;&lt;BR /&gt;Subsystems should be killed in the opposite order they were started. This implies that kill scripts will generally not have the same numbers as their start script counterparts. If two subsystems must be started in a given order due to dependencies (e.g., S200sys1 followed by S300uses_sys1), the counterparts to these scripts must be numbered so that the subsystems are stopped in the opposite order in which they were started (e.g., K700uses_sys1 followed by K800sys1).  The '1000' rule leads to this behavior. &lt;BR /&gt;&lt;BR /&gt;If you can't find the document file that Melvyn suggested you read, it is present here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/hpux/onlinedocs/os/startup.html" target="_blank"&gt;http://docs.hp.com/hpux/onlinedocs/os/startup.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The document is a easy reading and will answer all of your questions.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;/N&gt;</description>
      <pubDate>Wed, 24 Oct 2001 09:03:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/custom-start-kill-script/m-p/2600138#M593256</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-10-24T09:03:22Z</dc:date>
    </item>
  </channel>
</rss>

