<?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 how to add the startup script in hp-unix in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-add-the-startup-script-in-hp-unix/m-p/7032202#M602004</link>
    <description>&lt;P&gt;how to add the startup script in hp-unix 11.31&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jan 2019 04:35:18 GMT</pubDate>
    <dc:creator>rajesh73</dc:creator>
    <dc:date>2019-01-24T04:35:18Z</dc:date>
    <item>
      <title>how to add the startup script in hp-unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-add-the-startup-script-in-hp-unix/m-p/7032202#M602004</link>
      <description>&lt;P&gt;how to add the startup script in hp-unix 11.31&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 04:35:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-add-the-startup-script-in-hp-unix/m-p/7032202#M602004</guid>
      <dc:creator>rajesh73</dc:creator>
      <dc:date>2019-01-24T04:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to add the startup script in hp-unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-add-the-startup-script-in-hp-unix/m-p/7032215#M602005</link>
      <description>&lt;P&gt;A quick explanation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Startup and stop scripts in 11.31 are located in "/sbin/initd.d/"&lt;/P&gt;&lt;P&gt;- Configuration files/items, like variables should be placed in /etc/rc.config.d/&lt;/P&gt;&lt;P&gt;&amp;nbsp;There is a "template" file in /sbin/init.d that you should copy, rename and use. It also has some general descriptions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Modify/add the 4 possible options in the "case $1" statement.&lt;/P&gt;&lt;P&gt;Test start and stop:&lt;/P&gt;&lt;P&gt;To start run:&lt;/P&gt;&lt;P&gt;"/sbin/init.d/&amp;lt;your_script&amp;gt; start "&lt;/P&gt;&lt;P&gt;To stop run:&lt;/P&gt;&lt;P&gt;"/sbin/init.d/&amp;lt;your_script&amp;gt; stop"&lt;/P&gt;&lt;P&gt;To let HPUX run the script during startup and stop, you need to add symbolic links.&lt;/P&gt;&lt;P&gt;First you need to decide in which run-level the script should be started. E.g. 2&lt;/P&gt;&lt;P&gt;Under /sbin you will find directories named "rc1.d, rc2.d, rc3.d" etc....&amp;nbsp;&lt;/P&gt;&lt;P&gt;The number is the run-level.&lt;/P&gt;&lt;P&gt;If you want your script to be run when entering run-level2, then you will need to create a symbolic link to your script in "rc.2.d".&lt;/P&gt;&lt;P&gt;The symbolic link-name need to begin with a "S" and a number and point to your created startup-script. (check the files/links in the directory and you will understand.&amp;nbsp; E.g. "S432my_new_startup -&amp;gt; /sbin/init.d/&amp;lt;your_script&amp;gt;"&lt;/P&gt;&lt;P&gt;Note that your script will now be called twice when entering run-level 2.&lt;/P&gt;&lt;P&gt;First time with option "start_msg", second time with option "start". (Its all scripted, check "/sbin/rc" ).&lt;/P&gt;&lt;P&gt;The number that you put into your symbolic link defines the order of the startup. lower numbers are called first.&lt;/P&gt;&lt;P&gt;The same method needs to be applied when doing the stop.&lt;/P&gt;&lt;P&gt;In the example, you would want your script to be run with the "stop" option when moving from run-level 2 to run-level 1.&lt;/P&gt;&lt;P&gt;Thus, you need to add a link in "/sbin/rc1.d/". This link need to start with "K" followed by a number.....&lt;/P&gt;&lt;P&gt;Run "ll /sbin/*/*audit", and you will understand how that should look like. (i picked up the audit-script as an example)&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 08:13:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-add-the-startup-script-in-hp-unix/m-p/7032215#M602005</guid>
      <dc:creator>Bertram Stoeckler</dc:creator>
      <dc:date>2019-01-24T08:13:11Z</dc:date>
    </item>
  </channel>
</rss>

