<?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: Startup scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345067#M191502</link>
    <description>Yes you are right on ! :-)&lt;BR /&gt;&lt;BR /&gt;# vi /etc/rc.config.d/myapp&lt;BR /&gt;RUN_IT=1&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;# vi /sbin/init.d/myapp&lt;BR /&gt;- Replace CONTROL_VARIABLE with RUN_IT&lt;BR /&gt;&lt;BR /&gt;create sym links in /sbin/rc3.d to start and in /sbin/rc2.d (or below) to shutdown the application.</description>
    <pubDate>Fri, 30 Jul 2004 13:41:24 GMT</pubDate>
    <dc:creator>Sundar_7</dc:creator>
    <dc:date>2004-07-30T13:41:24Z</dc:date>
    <item>
      <title>Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345056#M191491</link>
      <description>I'm trying to add a custom script into to the system boot. If I'm not mistaken, I should only have to link the script to the proper rc directory like so&lt;BR /&gt;&lt;BR /&gt;ln -s /path/to/script /sbin/rc3.d/S999script.name&lt;BR /&gt;&lt;BR /&gt;This is a script that starts and runs fine from the command line, but addinig to startup will be very useful. Is this correct or am I way off and risk hanging the boot like this? As you can see I want it to be the last thing that starts at boot time.</description>
      <pubDate>Thu, 29 Jul 2004 16:24:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345056#M191491</guid>
      <dc:creator>Matthew Couper</dc:creator>
      <dc:date>2004-07-29T16:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345057#M191492</link>
      <description>For consistancy purposes the script really should be in /sbin/init.d with the link in /sbin/rc?.d/S999scriptname. &lt;BR /&gt;Did you use the template startup script as a guide in /sbin/init.d ? If not there could be something wrong. You may wish to post a copy here.</description>
      <pubDate>Thu, 29 Jul 2004 16:31:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345057#M191492</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-07-29T16:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345058#M191493</link>
      <description>The /sbin/rc script executes the script with "start" as the argument if the link starts with S and executes the script with "stop" as the argument if the link starts with "K".&lt;BR /&gt;&lt;BR /&gt;As suggested, copy /sbin/init.d/template and include the script commands in the "start" section of the template.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jul 2004 16:46:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345058#M191493</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-07-29T16:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345059#M191494</link>
      <description>HP-UX does things a little differently that other UNIX flavors. You should really put your script in /sbin/init.d and softlink your Snnn startup and Knnn kill scripts to this file in /sbin/init.d. There is a template in /sbin/init.d that you should copy and use as a model. One difference in HP-UX is that in addition to the traditional "stop" and "start" arguments, "stop_msg" and "start_msg" arguments are also supplied by rc. That's where those [BUSY] [WAIT] [OK] startup/shutdown messages come from.&lt;BR /&gt;&lt;BR /&gt;By convention, the startup and kill values should add to 1000. This tends to order the startup/shutdown sequences nicely. For example if you link:&lt;BR /&gt;ln -s /sbin/init.d/myscript /sbin/rc3.d/S999myscript&lt;BR /&gt;&lt;BR /&gt;You should link a kill script in run-level -1&lt;BR /&gt;ln -s /sbin/init.d/myscript /sbin/rc2.d/K001myscript&lt;BR /&gt;&lt;BR /&gt;Make sure that you set and export and needed environment variables including PATH or you may find that the command will work perfectly when executed manually (when you have a nice PATH, etc.) but fail when rc'ed.&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jul 2004 16:51:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345059#M191494</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-07-29T16:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345060#M191495</link>
      <description>HP-UX does things a little differently that other UNIX flavors. You should really put your script in /sbin/init.d and softlink your Snnn startup and Knnn kill scripts to this file in /sbin/init.d. There is a template in /sbin/init.d that you should copy and use as a model. One difference in HP-UX is that in addition to the traditional "stop" and "start" arguments, "stop_msg" and "start_msg" arguments are also supplied by rc. That's where those [BUSY] [WAIT] [OK] startup/shutdown messages come from.&lt;BR /&gt;&lt;BR /&gt;By convention, the startup and kill values should add to 1000. This tends to order the startup/shutdown sequences nicely. For example if you link:&lt;BR /&gt;ln -s /sbin/init.d/myscript /sbin/rc3.d/S999myscript&lt;BR /&gt;&lt;BR /&gt;You should link a kill script in run-level -1&lt;BR /&gt;ln -s /sbin/init.d/myscript /sbin/rc2.d/K001myscript&lt;BR /&gt;&lt;BR /&gt;Make sure that you set and export any needed environment variables including PATH or you may find that the command will work perfectly when executed manually (when you have a nice PATH, etc.) but fail when rc'ed.&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jul 2004 16:51:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345060#M191495</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-07-29T16:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345061#M191496</link>
      <description>One more thing, /sbin/rc determines whether the script execution is successful or not based on the exit value.&lt;BR /&gt;&lt;BR /&gt;an exit value of 3 from your script would mean the system will keep rebooting :-).&lt;BR /&gt;&lt;BR /&gt;an exit value of 1 means failure, 2 means the script execution is skipped based on setting in some configuration file the script uses. (the startup scripts source /etc/rc.config.d/* files).</description>
      <pubDate>Thu, 29 Jul 2004 17:09:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345061#M191496</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-07-29T17:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345062#M191497</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I've attached a document on startup that provides excellent info on how startup/shutdown scripts work under HP-UX.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Con</description>
      <pubDate>Thu, 29 Jul 2004 19:47:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345062#M191497</guid>
      <dc:creator>Con O'Kelly</dc:creator>
      <dc:date>2004-07-29T19:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345063#M191498</link>
      <description>This is off-thread, but Con, can you supply the link to the complete Doc that you attached  Chap3 from?  Got it somewhere, on some system, but I've lost it.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Rt.</description>
      <pubDate>Fri, 30 Jul 2004 08:13:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345063#M191498</guid>
      <dc:creator>Robert True</dc:creator>
      <dc:date>2004-07-30T08:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345064#M191499</link>
      <description>Thanks everyone, very helpful indead (even helped me on another issue I had!)&lt;BR /&gt;&lt;BR /&gt;You've given me more then enough to get in the right direction on this, thanks so much!&lt;BR /&gt;&lt;BR /&gt;If I have any other questions I'll post them here&lt;BR /&gt;&lt;BR /&gt;(and Clay, no points for double posting! =)</description>
      <pubDate>Fri, 30 Jul 2004 08:18:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345064#M191499</guid>
      <dc:creator>Matthew Couper</dc:creator>
      <dc:date>2004-07-30T08:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345065#M191500</link>
      <description>I'm stumped on the template file, what is the CONTROL_VARIABLE for? Should that be changed or is the default fine for that?</description>
      <pubDate>Fri, 30 Jul 2004 12:47:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345065#M191500</guid>
      <dc:creator>Matthew Couper</dc:creator>
      <dc:date>2004-07-30T12:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345066#M191501</link>
      <description>I think I found my answer, the CONTROL_VARIABLE is used to determine if this should run or not.&lt;BR /&gt;So say I make a new script from the template and call it "start_script" and I use RUN_IT for the control variable, I need another file in /etc/rc.config.d called "start_script" and in there is a line that says RUN_IT=1 which say to run the script, if the 1 was a 0 it would skip running the script.&lt;BR /&gt;&lt;BR /&gt;Is that run-on sentence the correct pattern (other then the obvious grammar errors)?</description>
      <pubDate>Fri, 30 Jul 2004 13:07:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345066#M191501</guid>
      <dc:creator>Matthew Couper</dc:creator>
      <dc:date>2004-07-30T13:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Startup scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345067#M191502</link>
      <description>Yes you are right on ! :-)&lt;BR /&gt;&lt;BR /&gt;# vi /etc/rc.config.d/myapp&lt;BR /&gt;RUN_IT=1&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;# vi /sbin/init.d/myapp&lt;BR /&gt;- Replace CONTROL_VARIABLE with RUN_IT&lt;BR /&gt;&lt;BR /&gt;create sym links in /sbin/rc3.d to start and in /sbin/rc2.d (or below) to shutdown the application.</description>
      <pubDate>Fri, 30 Jul 2004 13:41:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-scripts/m-p/3345067#M191502</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-07-30T13:41:24Z</dc:date>
    </item>
  </channel>
</rss>

