<?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: script problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725469#M945895</link>
    <description>if it's short enough, post the script.&lt;BR /&gt;if it's too big for that, add a -x to the first line (either #!/bin/ksh -x or #!/bin/sh -x depending on which shell you are using) and then add this line to route standard error to a log file:&lt;BR /&gt;&lt;BR /&gt;exec 2&amp;gt;/tmp/errorlog.txt&lt;BR /&gt;&lt;BR /&gt;and then boot your box and see what you get in the error log file. You should be able to tell which line the script is stopping on and what the error is.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;mark</description>
    <pubDate>Thu, 16 May 2002 12:55:47 GMT</pubDate>
    <dc:creator>Mark Greene_1</dc:creator>
    <dc:date>2002-05-16T12:55:47Z</dc:date>
    <item>
      <title>script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725464#M945890</link>
      <description>Hi guys!!!!&lt;BR /&gt;&lt;BR /&gt;I have made a script to run a software at boot.&lt;BR /&gt;&lt;BR /&gt;I have linked it in /sbin/rc3.d, I have created the config file in /etc/rc.config.d&lt;BR /&gt;&lt;BR /&gt;But ...... &lt;BR /&gt;if I try to run it in a shell, it work.&lt;BR /&gt;&lt;BR /&gt;If i try to run it in crontab, it work&lt;BR /&gt;&lt;BR /&gt;If I reboot the server, start and ( I can see it with a ps -ef in a loop) and stop without an error or log.&lt;BR /&gt;&lt;BR /&gt;Someone know why???&lt;BR /&gt;</description>
      <pubDate>Thu, 16 May 2002 12:44:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725464#M945890</guid>
      <dc:creator>Domenico_5</dc:creator>
      <dc:date>2002-05-16T12:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725465#M945891</link>
      <description>Domenico,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It's probably an environment issue. ALL commands in scripts should have the FULL path. Never assume that the system has a PATH variable set correctly, ie:&lt;BR /&gt;&lt;BR /&gt;instead of &lt;BR /&gt;&lt;BR /&gt;lsof | grep TCP&lt;BR /&gt;&lt;BR /&gt;should be &lt;BR /&gt;&lt;BR /&gt;/usr/local/bin/lsof | grep TCP&lt;BR /&gt;&lt;BR /&gt;or better yet&lt;BR /&gt;&lt;BR /&gt;/usr/local/bin/lsof | /usr/bin/grep TCP&lt;BR /&gt;&lt;BR /&gt;How about posting the script?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Thu, 16 May 2002 12:47:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725465#M945891</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-05-16T12:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725466#M945892</link>
      <description>hi harry&lt;BR /&gt;&lt;BR /&gt;No it isn't a PATH problem.&lt;BR /&gt;&lt;BR /&gt;If I try to run it in a crontab, it work.&lt;BR /&gt;&lt;BR /&gt;And I have write all PATH in all command</description>
      <pubDate>Thu, 16 May 2002 12:51:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725466#M945892</guid>
      <dc:creator>Domenico_5</dc:creator>
      <dc:date>2002-05-16T12:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725467#M945893</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Put set -x in the second line&lt;BR /&gt;&lt;BR /&gt;When you run it all commands are sent to standard out as they are executed&lt;BR /&gt;&lt;BR /&gt;Then you can see what it is doing.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;                   Steve Steel</description>
      <pubDate>Thu, 16 May 2002 12:53:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725467#M945893</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-05-16T12:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725468#M945894</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Does it show that it started correctly in the /etc/rc.log file?&lt;BR /&gt;&lt;BR /&gt;John&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 May 2002 12:53:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725468#M945894</guid>
      <dc:creator>John Strang</dc:creator>
      <dc:date>2002-05-16T12:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725469#M945895</link>
      <description>if it's short enough, post the script.&lt;BR /&gt;if it's too big for that, add a -x to the first line (either #!/bin/ksh -x or #!/bin/sh -x depending on which shell you are using) and then add this line to route standard error to a log file:&lt;BR /&gt;&lt;BR /&gt;exec 2&amp;gt;/tmp/errorlog.txt&lt;BR /&gt;&lt;BR /&gt;and then boot your box and see what you get in the error log file. You should be able to tell which line the script is stopping on and what the error is.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;mark</description>
      <pubDate>Thu, 16 May 2002 12:55:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725469#M945895</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2002-05-16T12:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725470#M945896</link>
      <description>It's best to use the startup script template in /sbin/init.d/template and craft your coding in it. That usually works for me. Checking /etc/rc.log is a good idea like what John has suggested.</description>
      <pubDate>Thu, 16 May 2002 12:58:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725470#M945896</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-05-16T12:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725471#M945897</link>
      <description>Your script should be in /sbin/init.d  and the name of the symbolic link in /sbin/rc3.d must start with Sxxx where 'xxx' is the number that determines the order of execution at the current run level.&lt;BR /&gt;&lt;BR /&gt;If you want the script to execute during system shutdown, there should be another link in /sbin/rc2.d whose name starts with Kyyy,&lt;BR /&gt;where xxx + yyy = 1000&lt;BR /&gt;(this determines the opposite order of execution during system shutdown.).&lt;BR /&gt;&lt;BR /&gt;During system startup the system will execute:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;1)&lt;BR /&gt;&lt;BR /&gt;&lt;YOUR_SCRIPT&gt;&lt;/YOUR_SCRIPT&gt;&lt;BR /&gt;2)&lt;BR /&gt;&lt;BR /&gt;&lt;YOUR_SCRIPT&gt;&lt;/YOUR_SCRIPT&gt;&lt;BR /&gt;During system shutdown, the system will execute&lt;BR /&gt;&lt;BR /&gt;3)&lt;BR /&gt;&lt;BR /&gt;&lt;YOUR_SCRIPT&gt;&lt;/YOUR_SCRIPT&gt;&lt;BR /&gt;4)&lt;BR /&gt;&lt;BR /&gt;&lt;YOUR_SCRIPT&gt;&lt;/YOUR_SCRIPT&gt;&lt;BR /&gt;Therefore your script should be able to handle the parameters:&lt;BR /&gt;&lt;BR /&gt;start_msg&lt;BR /&gt;start&lt;BR /&gt;stop_msg&lt;BR /&gt;stop&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;Mladen&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 May 2002 13:00:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725471#M945897</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2002-05-16T13:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725472#M945898</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;All work correctly, with -x, with path, with all&lt;BR /&gt;&lt;BR /&gt;but at boot time no!! Sigh Sigh&lt;BR /&gt;&lt;BR /&gt;Whyyyyyy!!!!!!</description>
      <pubDate>Thu, 16 May 2002 13:02:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725472#M945898</guid>
      <dc:creator>Domenico_5</dc:creator>
      <dc:date>2002-05-16T13:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725473#M945899</link>
      <description>mladen&lt;BR /&gt;&lt;BR /&gt;I have used the template&lt;BR /&gt;&lt;BR /&gt;I had check with &lt;BR /&gt;&lt;BR /&gt;/sbin/rc3.d/S101nrpe start&lt;BR /&gt;ok&lt;BR /&gt;/sbin/rc3.d/S101nrpe stop&lt;BR /&gt;ok&lt;BR /&gt;/sbin/rc3.d/S101nrpe start_msg&lt;BR /&gt;ok&lt;BR /&gt;/sbin/rc3.d/S101nrpe stop_msg&lt;BR /&gt;ok&lt;BR /&gt;&lt;BR /&gt;but at the boot time no it doesn't work!!!!!&lt;BR /&gt;</description>
      <pubDate>Thu, 16 May 2002 13:08:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725473#M945899</guid>
      <dc:creator>Domenico_5</dc:creator>
      <dc:date>2002-05-16T13:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725474#M945900</link>
      <description>Might it be that the script uses something from a disk that is not *YET* mounted at boot time?</description>
      <pubDate>Thu, 16 May 2002 13:08:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725474#M945900</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-05-16T13:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725475#M945901</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;OK, so are you relying on something else that has *not* yet started when your script is launched???  That is, you have linked it into the startup sequence too early???&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 16 May 2002 13:09:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725475#M945901</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-05-16T13:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725476#M945902</link>
      <description>Hi Domenico,&lt;BR /&gt;Don't be offended by this, but have you checked permissions in /sbin/rc3.d and in /sbin/init.d&lt;BR /&gt;&lt;BR /&gt;And is the script in /sbin/rc3.d correctly named and linked to the script in /sbin/init.d&lt;BR /&gt;&lt;BR /&gt;John&lt;BR /&gt;</description>
      <pubDate>Thu, 16 May 2002 13:10:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725476#M945902</guid>
      <dc:creator>John Strang</dc:creator>
      <dc:date>2002-05-16T13:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725477#M945903</link>
      <description>&amp;gt;&amp;gt;All work correctly, with -x, with path, with all &lt;BR /&gt;&lt;BR /&gt;but at boot time no!! Sigh Sigh &amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;When you rebooted the system, what did the error log show?  If it was empty, or if the timestamp on the file did not change from when you ran it at the command line (if you did that first), then that suggests that your script is not getting started at all during boot, and that there is a setup piece missing.&lt;BR /&gt;&lt;BR /&gt;mark</description>
      <pubDate>Thu, 16 May 2002 13:11:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725477#M945903</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2002-05-16T13:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725478#M945904</link>
      <description>When you link it in rc3.d, make sure that's the last startup script. Choose a higher SXXX&lt;BR /&gt;number.</description>
      <pubDate>Thu, 16 May 2002 13:12:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725478#M945904</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-05-16T13:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725479#M945905</link>
      <description>&lt;BR /&gt;Does the script require any volumes to be mounted, the network to be up and running, a database to be started? It could be just a matter of boot sequence.&lt;BR /&gt;&lt;BR /&gt;Can you post the script?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Thu, 16 May 2002 13:27:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725479#M945905</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-05-16T13:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725480#M945906</link>
      <description>hi guys&lt;BR /&gt;&lt;BR /&gt;yes, it's the last in rc3.d&lt;BR /&gt;&lt;BR /&gt;On a Workstation whit the same OS all work correctly&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 May 2002 13:27:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725480#M945906</guid>
      <dc:creator>Domenico_5</dc:creator>
      <dc:date>2002-05-16T13:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725481#M945907</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;You certainly have a lot of curiosity generated.  Several folks have asked you to *please post the script*.  Well?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 16 May 2002 13:30:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725481#M945907</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-05-16T13:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725482#M945908</link>
      <description>Domenico,&lt;BR /&gt;&lt;BR /&gt;/sbin/rc3.d/S101nrpe star_msg&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;/sbin/rc3.d/S101nrpe start&lt;BR /&gt;&lt;BR /&gt;are valid tests.  You can try rebooting into a single-user mode.  Do 'mount -a' and then run the same tests.&lt;BR /&gt;&lt;BR /&gt;The other two commands:&lt;BR /&gt;&lt;BR /&gt;/sbin/rc3.d/S101nrpe stop_msg&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;/sbin/rc3.d/S101nrpe stop&lt;BR /&gt;&lt;BR /&gt;should be replaced by:&lt;BR /&gt;&lt;BR /&gt;/sbin/rc2.d/K899nrpe stop_msg&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;/sbin/rc2.d/K899nrpe stop&lt;BR /&gt;&lt;BR /&gt;respectively.&lt;BR /&gt;&lt;BR /&gt;Mladen</description>
      <pubDate>Thu, 16 May 2002 13:46:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725482#M945908</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2002-05-16T13:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725483#M945909</link>
      <description>While you try... put it in /sbin/rc4.d/S100xxx&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And then you will do: init 4 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;insert :&lt;BR /&gt;&lt;BR /&gt;exec 2&amp;gt;/tmp/whatishappening&lt;BR /&gt;set -x&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;on the first lines of your scripts...&lt;BR /&gt;if /tmp/whatishappening exists at least you know the script have been executed, and the errors produced...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 May 2002 14:02:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2725483#M945909</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2002-05-16T14:02:07Z</dc:date>
    </item>
  </channel>
</rss>

