<?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 script not working in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168925#M160953</link>
    <description>I copied it to my workstation so i can test it there!!</description>
    <pubDate>Tue, 20 Jan 2004 15:15:17 GMT</pubDate>
    <dc:creator>Todd McDaniel_1</dc:creator>
    <dc:date>2004-01-20T15:15:17Z</dc:date>
    <item>
      <title>startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168916#M160944</link>
      <description>Hey all.&lt;BR /&gt;&lt;BR /&gt;I have a startup script I attempted to use over the weekend. I made the links to the exe in rc3.d and rc2.d for S and K symlinks. The file is executable...&lt;BR /&gt;&lt;BR /&gt;However, it didnt start up upon a reboot. Must I have the exe in /sbin? b/c of the system reading into memory the startup scripts at boot time before the system has mounted my other filesystems?&lt;BR /&gt;&lt;BR /&gt;Here is what I have... I think I just answered my own question! hehe...&lt;BR /&gt;&lt;BR /&gt;root:/root&lt;BR /&gt;#ll /appl/finapps/applmgr/local/bin/run_Xvfb.sh&lt;BR /&gt;-rwxr-xr-x   1 applmgr    fin            206 Jan 15 13:17 /appl/finapps/applmgr/&lt;BR /&gt;local/bin/run_Xvfb.sh&lt;BR /&gt;&lt;BR /&gt;root:/var/adm/sa&lt;BR /&gt;# ll /sbin/rc3.d/S888run_Xvfb.sh                &lt;BR /&gt;lrwx--x--x   1 root       sys             43 Jan 15 14:26 /sbin/rc3.d/S888run_Xv&lt;BR /&gt;fb.sh -&amp;gt; /appl/finapps/applmgr/local/bin/run_Xvfb.sh&lt;BR /&gt;&lt;BR /&gt;root:/var/adm/sa&lt;BR /&gt;# ll /sbin/rc2.d/K888run_Xvfb.sh &lt;BR /&gt;lrwx--x--x   1 root       sys             43 Jan 15 14:27 /sbin/rc2.d/K888run_Xv&lt;BR /&gt;fb.sh -&amp;gt; /appl/finapps/applmgr/local/bin/run_Xvfb.sh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am guessing I need to do:&lt;BR /&gt;&lt;BR /&gt;mv /appl/finapps/applmgr/local/bin/run_Xvfb.sh /sbin/init.d/run_Xvfb.sh&lt;BR /&gt;&lt;BR /&gt;And relink my S and K scripts...&lt;BR /&gt;&lt;BR /&gt;PS. I went ahead and posted this for anyone else who may be wondering how to do this... &lt;BR /&gt;&lt;BR /&gt;I had to talk this out to get it right. I just haven't had to do this in a long while, so my brain is in recovery mode!</description>
      <pubDate>Tue, 20 Jan 2004 14:15:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168916#M160944</guid>
      <dc:creator>Todd McDaniel_1</dc:creator>
      <dc:date>2004-01-20T14:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168917#M160945</link>
      <description>Todd, &lt;BR /&gt;&lt;BR /&gt;Give yourself a bunny - you've got it!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 20 Jan 2004 14:20:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168917#M160945</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-01-20T14:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168918#M160946</link>
      <description>It's possible that the filesystems were not mounted but I suspect that the real problem is that the arguments "stop", "start", "start_msg", and "stop_msg" supplied by rc were not understood by your script. It's really important to follow the proper conventions. Both your S and K scripts should be soft-linked to the same file in /sbin/init.d and that file should process the arguments and take the appropriate actions.&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Jan 2004 14:23:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168918#M160946</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-01-20T14:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168919#M160947</link>
      <description>I dont have any start/stop functionality in the script. I merely linked it to the rc* directories. The script belongs to one of my DBAs. &lt;BR /&gt;&lt;BR /&gt;I will have my DBA modify his script...for stop/start input.</description>
      <pubDate>Tue, 20 Jan 2004 14:34:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168919#M160947</guid>
      <dc:creator>Todd McDaniel_1</dc:creator>
      <dc:date>2004-01-20T14:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168920#M160948</link>
      <description>The other "gotcha" is not properly setting up the environment. Scripts that run fine in an interactive environemtn may not work under rc. It's very important that all needed variables be set and exported and also avoid any interactive commands.&lt;BR /&gt;&lt;BR /&gt;A very typical problem occurs with&lt;BR /&gt;su - oracle ... commands &lt;BR /&gt;instead of su oracle ... command. The "-" causes su to execute oracle's .profile which contains commands like tput, stty, tabs, ... that will probably hang when not attached to a terminal.&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Jan 2004 14:38:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168920#M160948</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-01-20T14:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168921#M160949</link>
      <description>Hi Todd,&lt;BR /&gt;&lt;BR /&gt;Don't forget to setup a config file to easily toggle auto-start on/off&lt;BR /&gt;&lt;BR /&gt;Create a file in /etc/rc.config.d &amp;amp; name it Xvfbconf&lt;BR /&gt;In it place &lt;BR /&gt;XVFB_START=1 #for auto-start&lt;BR /&gt;XVFB_START_COMMAND="/appl/finapps/applmgr/local/bin/run_Xvfb.sh"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then place logic in the /sbin/init.d/run_Xvfb.sh file&lt;BR /&gt;like the following examples:&lt;BR /&gt;&lt;BR /&gt;if [ -f /etc/rc.config.d/Xvfbconf ]&lt;BR /&gt;  then . /etc/rc.config.d/Xvfbconf&lt;BR /&gt;  else echo "ERROR /etc/rc.config.d/Xvfbconf            file MISSING"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;In the 'start') section add the following to check the conf value &amp;amp; check whether the start script is executable:&lt;BR /&gt;&lt;BR /&gt;if ["$XVFB_START != 1 ]&lt;BR /&gt;then rval=2&lt;BR /&gt;else&lt;BR /&gt;  if [-x /appl/finapps/applmgr/local/bin/run_Xvfb.sh ]&lt;BR /&gt;  then&lt;BR /&gt;    if [ "$XVFB_START_COMMAND != "" ]&lt;BR /&gt;    then eval $XVFB_START_COMMAND&lt;BR /&gt;    else /appl/finapps/applmgr/local/bin/run_Xvfb.sh&lt;BR /&gt;    fi&lt;BR /&gt;  fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Tue, 20 Jan 2004 14:49:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168921#M160949</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-01-20T14:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168922#M160950</link>
      <description>Hmmmm - both those snippets should be under the start section - not just the last one.&lt;BR /&gt;&lt;BR /&gt;Jeff</description>
      <pubDate>Tue, 20 Jan 2004 14:52:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168922#M160950</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-01-20T14:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168923#M160951</link>
      <description>Hi (again) Todd,&lt;BR /&gt;&lt;BR /&gt;I just saw your post RE not having atrt/stop/start_msg/stop_msg sections &amp;amp; I *highly* recommend you do add these.&lt;BR /&gt;&lt;BR /&gt;Have whomever's writing it just use /sbin/init.d/template as the actual template &amp;amp; just fill in what you need &amp;amp; save it with appropriate filename.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Tue, 20 Jan 2004 15:00:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168923#M160951</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-01-20T15:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168924#M160952</link>
      <description>Jeff my actual path is /sbin/init.d/run_Xvfb.sh now...&lt;BR /&gt;&lt;BR /&gt; I am editing it now.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My question is about the start section... I have this so far...&lt;BR /&gt;&lt;BR /&gt;# cat /sbin/init.d/run_Xvfb.sh&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt; &lt;BR /&gt;# setup virtual x server for Oracle ERP 11i graphical display&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;# Read /etc/rc.config.d/Xvfbconf for start toggle upon boot time.&lt;BR /&gt;# XVFB_START=1 is for start... XVFB_START=0 is for dont start&lt;BR /&gt; &lt;BR /&gt;if [ -f /etc/rc.config.d/Xvfbconf ]&lt;BR /&gt;then . /etc/rc.config.d/Xvfbconf&lt;BR /&gt;else echo "ERROR /etc/rc.config.d/Xvfbconf file MISSING"&lt;BR /&gt;fi&lt;BR /&gt; &lt;BR /&gt;PATH=/usr/sbin:/usr/bin:/sbin; export PATH&lt;BR /&gt;mode=$1&lt;BR /&gt;case "$mode" in&lt;BR /&gt;    'start_msg')&lt;BR /&gt;        echo "Start Xvfb"&lt;BR /&gt;        exit 0&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;    'stop_msg')&lt;BR /&gt;        echo "Stop Xvfb"&lt;BR /&gt;        exit 0&lt;BR /&gt;        ;;&lt;BR /&gt; &lt;BR /&gt;    'start')&lt;BR /&gt;        if ["$XVFB_START != 1 ]&lt;BR /&gt;        then rval=2&lt;BR /&gt;        else&lt;BR /&gt;          if [-x /sbin/init.d/run_Xvfb.sh ]&lt;BR /&gt;          then&lt;BR /&gt;            if [ "$XVFB_START_COMMAND != "" ]&lt;BR /&gt;            then eval $XVFB_START_COMMAND&lt;BR /&gt;            else /sbin/init.d/run_Xvfb.sh&lt;BR /&gt;            fi&lt;BR /&gt;          fi&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;        nohup /usr/bin/X11/Xvfb :4 -screen 0 1024x800x8 -pn -fp /usr/lib/X11/fon&lt;BR /&gt;ts/misc -sp /etc/X11/SecurityPolicy &amp;amp;&lt;BR /&gt;        ;;&lt;BR /&gt; &lt;BR /&gt;    'stop')&lt;BR /&gt;        PIDS=`ps -aef |grep -v grep|grep Xvfb |awk '{ print $2 }'`&lt;BR /&gt;          kill $PIDS&lt;BR /&gt;        ;;&lt;BR /&gt;    *)&lt;BR /&gt;        echo "Usage: \$0 { start | stop }"&lt;BR /&gt;        exit 1&lt;BR /&gt;        ;;&lt;BR /&gt;esac&lt;BR /&gt;exit 0&lt;BR /&gt;Where do I put my command line in there? is it fine at the end of the start section? or is that bad coding?</description>
      <pubDate>Tue, 20 Jan 2004 15:10:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168924#M160952</guid>
      <dc:creator>Todd McDaniel_1</dc:creator>
      <dc:date>2004-01-20T15:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168925#M160953</link>
      <description>I copied it to my workstation so i can test it there!!</description>
      <pubDate>Tue, 20 Jan 2004 15:15:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168925#M160953</guid>
      <dc:creator>Todd McDaniel_1</dc:creator>
      <dc:date>2004-01-20T15:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168926#M160954</link>
      <description>Gonna refer to the template... I have an error around the fi fi fi area... "fi" unexpected error.&lt;BR /&gt;&lt;BR /&gt;Thanks for everyone's help!</description>
      <pubDate>Tue, 20 Jan 2004 15:30:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168926#M160954</guid>
      <dc:creator>Todd McDaniel_1</dc:creator>
      <dc:date>2004-01-20T15:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168927#M160955</link>
      <description>Hi Todd,&lt;BR /&gt;&lt;BR /&gt;Actual startup command follows the final else in that script. I guess I didn't understand what your actual startup command was - it wasn't in the org post. So change the conf file as well as all calls to the actual startup command to your actual startup&lt;BR /&gt;I also noticed a missing double quote in the test for whether the start command is null - the var needs an ending double quote. The double double-quote is the actual null.&lt;BR /&gt;The template does not have this error &amp;amp; they keep the fi with each if-then section - I just put them all at the end &amp;amp; I also test to make sure the startup is executable whereas the template does not.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Tue, 20 Jan 2004 15:46:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168927#M160955</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-01-20T15:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168928#M160956</link>
      <description>Jeff: Let me say I got the script to work with the template portion for the start section... but I wanted to get your script working as well...&lt;BR /&gt;&lt;BR /&gt;Okay I got it except for one small error.&lt;BR /&gt;&lt;BR /&gt;On line 34 where the test for the var is:&lt;BR /&gt;&lt;BR /&gt;if ["$XVFB_START" != 1 ]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I get a [1: not found error&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;---------------------------------------------------&lt;BR /&gt;# cat run_Xvfb.sh&lt;BR /&gt;# setup virtual x server for Oracle ERP 11i graphical display&lt;BR /&gt;# Steve Wang 1/12/04&lt;BR /&gt;#### OLD LINE EDITED&lt;BR /&gt;#nohup /usr/bin/X11/Xvfb :4 -screen 0 1024x800x8 -pn -fp /usr/lib/X11/fonts/misc&lt;BR /&gt; -sp /etc/X11/SecurityPolicy &amp;amp;&lt;BR /&gt;# Read /etc/rc.config.d/Xvfbconf for start toggle upon boot time.&lt;BR /&gt;# XVFB_START=1 is for start... XVFB_START=0 is for dont start&lt;BR /&gt;if [ -f /etc/rc.config.d/Xvfbconf ]&lt;BR /&gt;then . /etc/rc.config.d/Xvfbconf&lt;BR /&gt;else echo "ERROR /etc/rc.config.d/Xvfbconf file MISSING"&lt;BR /&gt;fi&lt;BR /&gt;####&lt;BR /&gt;## New script changed 01-20-2004 Todd McDaniel...&lt;BR /&gt;PATH=/usr/sbin:/usr/bin:/sbin; export PATH&lt;BR /&gt;mode=$1&lt;BR /&gt;case "$mode" in&lt;BR /&gt;    "start_msg")&lt;BR /&gt;        echo "Start Xvfb"&lt;BR /&gt;        exit 0&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;    "stop_msg")&lt;BR /&gt;        echo "Stop Xvfb"&lt;BR /&gt;        exit 0&lt;BR /&gt;        ;;&lt;BR /&gt;    "start")&lt;BR /&gt;        if ["$XVFB_START" != 1 ]&lt;BR /&gt;        then rval=2&lt;BR /&gt;        else&lt;BR /&gt;          if  [ -x/sbin/init.d/run_Xvfb.sh ] &lt;BR /&gt;          then&lt;BR /&gt;            if [ "$XVFB_START_COMMAND" != ""  ]&lt;BR /&gt;            then eval $XVFB_START_COMMAND&lt;BR /&gt;            else /sbin/init.d/run_Xvfb.sh&lt;BR /&gt;        nohup /usr/bin/X11/Xvfb :4 -screen 0 1024x800x8 -pn -fp /usr/lib/X11/fon&lt;BR /&gt;ts/misc -sp /etc/X11/SecurityPolicy &amp;amp;&lt;BR /&gt;fi&lt;BR /&gt;fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;        ;;&lt;BR /&gt;    "stop")&lt;BR /&gt;        PIDS=`ps -aef |grep -v grep|grep Xvfb |awk '{ print $2 }'`&lt;BR /&gt;          kill $PIDS&lt;BR /&gt;        ;;&lt;BR /&gt;    *)&lt;BR /&gt;        echo "Usage: \$0 { start | stop }"&lt;BR /&gt;        exit 1&lt;BR /&gt;        ;;&lt;BR /&gt;esac&lt;BR /&gt;exit 0</description>
      <pubDate>Tue, 20 Jan 2004 16:18:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168928#M160956</guid>
      <dc:creator>Todd McDaniel_1</dc:creator>
      <dc:date>2004-01-20T16:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168929#M160957</link>
      <description>Hi Todd,&lt;BR /&gt;&lt;BR /&gt;Don'r worry about mine - it works.&lt;BR /&gt;That wasn't a copy/paste - I typed it freehand - hence the typos.&lt;BR /&gt;Glad to hear you got yours going now.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Tue, 20 Jan 2004 16:34:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168929#M160957</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-01-20T16:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: startup script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168930#M160958</link>
      <description>Tod, what you miss is a space between the square bracket ('[') and the double quote ('"') making it one string instead of the command '['.</description>
      <pubDate>Wed, 21 Jan 2004 01:16:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/startup-script-not-working/m-p/3168930#M160958</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2004-01-21T01:16:26Z</dc:date>
    </item>
  </channel>
</rss>

