<?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 run on another shell in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413541#M672242</link>
    <description>Have your script check the startserver process and perform the &lt;BR /&gt;echo "BASE INICIADA" after that process is no longer in the processlist.&lt;BR /&gt;But... If for some reason the startup of your database fails, you'll still get the "BASE INICIADA" message as if everything is ok.&lt;BR /&gt;&lt;BR /&gt;You say startserver is a binary. How about RUN_SYBASE, if that is a script, you can create your own version of that script and let it mail you upon completion. You could even check for return codes and report a more meaningfull message.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Bart</description>
    <pubDate>Wed, 06 May 2009 07:13:58 GMT</pubDate>
    <dc:creator>Bart Paulusse</dc:creator>
    <dc:date>2009-05-06T07:13:58Z</dc:date>
    <item>
      <title>Script run on another shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413532#M672233</link>
      <description>I have a cluster serviceguard with HP-UX 11.11 and Sybase.&lt;BR /&gt;&lt;BR /&gt;I have a script to start the database whit those lines:&lt;BR /&gt;&lt;BR /&gt;su - sybase -c "/sybase/ASE-12_5/install/startserver -f /sybase/ASE-12_5/install/RUN_SYBASE"&lt;BR /&gt;echo "BASE INICIADA"&lt;BR /&gt;&lt;BR /&gt;But.... the messages "BASE INICIADA" appears before base started.&lt;BR /&gt;&lt;BR /&gt;Any idea?</description>
      <pubDate>Tue, 05 May 2009 16:07:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413532#M672233</guid>
      <dc:creator>Fernando Boza</dc:creator>
      <dc:date>2009-05-05T16:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script run on another shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413533#M672234</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Control the shell the script runs with the top line of the script.&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;# Whatever you want.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 05 May 2009 16:15:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413533#M672234</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-05-05T16:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Script run on another shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413534#M672235</link>
      <description>I can not test it right now but the "startserver" is a binary that detaches from the shell and runs in the background. So the execution continues immediately with the "echo" line while the startserver still running in the background and starts the databases. You can try puting the "echo" inside the "su -c" command as in &lt;BR /&gt;"su - sybase -c "/sybase/ASE-12_5/install/startserver -f /sybase/ASE-12_5/install/RUN_SYBASE; echo 'BASE INICIADA'&lt;BR /&gt;" but I don't think it will help.</description>
      <pubDate>Tue, 05 May 2009 18:20:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413534#M672235</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2009-05-05T18:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Script run on another shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413535#M672236</link>
      <description>I think this is wahts happening. your startserver script runs in background. it forks a process and then does echo "BASE INICIADA" doesn't wait for the completion of startserver.&lt;BR /&gt;&lt;BR /&gt;you can do this to avoid.  change the above line to look like this&lt;BR /&gt;&lt;BR /&gt;su - sybase -c "/sybase/ASE-12_5/install/startserver -f /sybase/ASE-12_5/install/RUN_SYBASE" &amp;amp;&amp;amp; echo "BASE INICIADA"&lt;BR /&gt;&lt;BR /&gt;i.e if the startserver scripts runs successfully then do the echo&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2009 05:08:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413535#M672236</guid>
      <dc:creator>Basheer_2</dc:creator>
      <dc:date>2009-05-06T05:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script run on another shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413536#M672237</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Put this in one line with ";" seperator&lt;BR /&gt;&lt;BR /&gt;su - sybase -c "/sybase/ASE-12_5/install/startserver -f /sybase/ASE-12_5/install/RUN_SYBASE";echo "BASE INICIADA"&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Wed, 06 May 2009 05:27:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413536#M672237</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-05-06T05:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script run on another shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413537#M672238</link>
      <description>&amp;gt;Suraj: Put this in one line with ";" separator&lt;BR /&gt;su - sybase -c "/sybase/ASE-12_5/install/startserver \&lt;BR /&gt;-f /sybase/ASE-12_5/install/RUN_SYBASE"; echo "BASE INICIADA"&lt;BR /&gt;&lt;BR /&gt;I don't see how this is any different, than separate su then echo.&lt;BR /&gt;&lt;BR /&gt;I suppose you could do both under that su but that won't be different, other than which shell does the echo.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2009 05:41:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413537#M672238</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-05-06T05:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Script run on another shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413538#M672239</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;If I give command saperater between 2 commands for example #ls;cat abc&lt;BR /&gt;&lt;BR /&gt;cat abc will run after compleated the 1st command right if this is ok then in above also right 1st it will run the su then it will run echo.&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Wed, 06 May 2009 06:09:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413538#M672239</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-05-06T06:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Script run on another shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413539#M672240</link>
      <description>&amp;gt;Suraj: If I give command separator between 2 commands for example #ls; cat abc&lt;BR /&gt;&lt;BR /&gt;There is no difference here between ";" and a newline.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;it will run the su then it will run echo.&lt;BR /&gt;&lt;BR /&gt;Yes, they are done in order but there is another process involved.  Since the author said it didn't work, and TTr mentioned "background" the ";" won't help.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2009 06:49:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413539#M672240</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-05-06T06:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script run on another shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413540#M672241</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;having a program which puts its execution in background requires an extra monitoring to get the exit status or completion of the background part.&lt;BR /&gt;&lt;BR /&gt;At first try&lt;BR /&gt;- measure the time until a connection to the DB succeeds&lt;BR /&gt;- write a monitor script which ...&lt;BR /&gt;- sleeps that time + some factor&lt;BR /&gt;- tries to connect to the DB&lt;BR /&gt;- reports the availability of the DB&lt;BR /&gt;&lt;BR /&gt;@Suraj: Your statement is incorrect:&lt;BR /&gt;&amp;gt;&amp;gt; #ls;cat abc&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; cat abc will run after compleated the 1st command right&lt;BR /&gt;&amp;gt;&amp;gt; if this is ok then in above also right&lt;BR /&gt;&amp;gt;&amp;gt; 1st it will run the su then it will run echo.&lt;BR /&gt;&lt;BR /&gt;- You'd have to use&lt;BR /&gt;ls &amp;amp;&amp;amp; cat abc&lt;BR /&gt;to do this. Yours would execute the 'cat' whether the 'ls' succeeds or not.&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2009 07:10:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413540#M672241</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2009-05-06T07:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Script run on another shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413541#M672242</link>
      <description>Have your script check the startserver process and perform the &lt;BR /&gt;echo "BASE INICIADA" after that process is no longer in the processlist.&lt;BR /&gt;But... If for some reason the startup of your database fails, you'll still get the "BASE INICIADA" message as if everything is ok.&lt;BR /&gt;&lt;BR /&gt;You say startserver is a binary. How about RUN_SYBASE, if that is a script, you can create your own version of that script and let it mail you upon completion. You could even check for return codes and report a more meaningfull message.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Bart</description>
      <pubDate>Wed, 06 May 2009 07:13:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-on-another-shell/m-p/4413541#M672242</guid>
      <dc:creator>Bart Paulusse</dc:creator>
      <dc:date>2009-05-06T07:13:58Z</dc:date>
    </item>
  </channel>
</rss>

