<?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: something special with hp-ux startup script ? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926252#M409063</link>
    <description>&lt;BR /&gt;Create startup &amp;amp; kill files /sbin/rc3.d .&lt;BR /&gt;&lt;BR /&gt;Eg:&lt;BR /&gt;     To start the any script when reboot,&lt;BR /&gt;     &lt;BR /&gt;     ln -s /sbin/init.d/call_script /sbin/rc3.d/S900call.rc&lt;BR /&gt;    &lt;BR /&gt;     To kill the any script when reboot,&lt;BR /&gt;     &lt;BR /&gt;     ln -s /sbin/init.d/call_script /sbin/rc3.d/K900call.rc&lt;BR /&gt;&lt;BR /&gt;Note:&lt;BR /&gt;       Here original file is /sbin/init.d/call_script&lt;BR /&gt;</description>
    <pubDate>Thu, 15 Sep 2005 03:36:45 GMT</pubDate>
    <dc:creator>VEL_1</dc:creator>
    <dc:date>2005-09-15T03:36:45Z</dc:date>
    <item>
      <title>something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926249#M409060</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have a little problem but I can't find the solution (I don't know hp-ux very well)&lt;BR /&gt;In my mind, when you want start a software on unix system startup you must write a script in /etc/init.d (/sbin/init.d/bbclient under hp-ux) and create a link in /etc/rc3.d (/sbin/rc3.d/ under hp-ux).&lt;BR /&gt;so I have this :&lt;BR /&gt;&lt;BR /&gt;# uname -a&lt;BR /&gt;HP-UX HP-NSR B.11.00 U 9000/879 288035332 unlimited-user license&lt;BR /&gt;# ls -la /sbin/init.d/bbclient&lt;BR /&gt;-rwxr-xr-x   1 root       sys            885 Sep 13 14:47 /sbin/init.d/bbclient&lt;BR /&gt;# ls -la /sbin/rc3.d/S999bbclient&lt;BR /&gt;lrwxrwxrwx   1 root       sys             21 Dec 28  2004 /sbin/rc3.d/S999bbclient -&amp;gt; sbin/init.d/bbclient&lt;BR /&gt;&lt;BR /&gt;# cat /sbin/init.d/bbclient&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;#&lt;BR /&gt;# Copyright (c) 1991-1999 by Sun Microsystems, Inc.&lt;BR /&gt;# All rights reserved.&lt;BR /&gt;#&lt;BR /&gt;#ident  "@(#)Arret demarrage du client bbuser  12/03/02 AvS"&lt;BR /&gt;id=`/bin/ps -edf | /bin/grep bbc |/bin/grep -v bbclient|/bin/grep -v grep| /bin/awk '{print $2}'` &lt;BR /&gt;case "$1" in&lt;BR /&gt;'start')&lt;BR /&gt;        if [ -n "$id" ]; then&lt;BR /&gt;                 echo "big brother client is already started"&lt;BR /&gt;        else&lt;BR /&gt;                 echo "starting big brother client"&lt;BR /&gt;                 (su - bbuser -c "/home/bbuser/bbc/runbb.sh $1&amp;amp;")&amp;gt;/dev/console 2&amp;gt;&amp;amp;1&lt;BR /&gt;        fi&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;'stop')&lt;BR /&gt;        if [ -n "$id" ]; then&lt;BR /&gt;                echo "Stopping big brother client"&lt;BR /&gt;                (su - bbuser -c "/home/bbuser/bbc/runbb.sh $1&amp;amp;")&amp;gt;/dev/console 2&amp;gt;&amp;amp;1&lt;BR /&gt;        else&lt;BR /&gt;                echo "big brother client is not running"&lt;BR /&gt;        fi&lt;BR /&gt;        unset id&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;&lt;BR /&gt;&lt;BR /&gt;When I do this, all is well, the softare run:&lt;BR /&gt;/sbin/init.d/bbclient start&lt;BR /&gt;but when I do a reboot, the software don't start.&lt;BR /&gt;It's a basic question but under solaris and linux there is no problem.&lt;BR /&gt;Is there something special for startup script under hp-ux ?&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for your help&lt;BR /&gt;&lt;BR /&gt;Julien</description>
      <pubDate>Thu, 15 Sep 2005 03:23:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926249#M409060</guid>
      <dc:creator>Pouponnot</dc:creator>
      <dc:date>2005-09-15T03:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926250#M409061</link>
      <description>what is there in /etc/rc.log regarding to your bbclient script. Is it your machine run level 3?&lt;BR /&gt;&lt;BR /&gt;check /etc/inittab or who -r&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Thu, 15 Sep 2005 03:31:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926250#M409061</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-15T03:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926251#M409062</link>
      <description>I think your link should say&lt;BR /&gt;&lt;BR /&gt;/sbin/rc3.d/S999bbclient -&amp;gt; /sbin/init.d/bbclient&lt;BR /&gt;&lt;BR /&gt;Or was the missing leading "/" on bbclient a typo?&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Sep 2005 03:33:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926251#M409062</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2005-09-15T03:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926252#M409063</link>
      <description>&lt;BR /&gt;Create startup &amp;amp; kill files /sbin/rc3.d .&lt;BR /&gt;&lt;BR /&gt;Eg:&lt;BR /&gt;     To start the any script when reboot,&lt;BR /&gt;     &lt;BR /&gt;     ln -s /sbin/init.d/call_script /sbin/rc3.d/S900call.rc&lt;BR /&gt;    &lt;BR /&gt;     To kill the any script when reboot,&lt;BR /&gt;     &lt;BR /&gt;     ln -s /sbin/init.d/call_script /sbin/rc3.d/K900call.rc&lt;BR /&gt;&lt;BR /&gt;Note:&lt;BR /&gt;       Here original file is /sbin/init.d/call_script&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Sep 2005 03:36:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926252#M409063</guid>
      <dc:creator>VEL_1</dc:creator>
      <dc:date>2005-09-15T03:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926253#M409064</link>
      <description>Julien,&lt;BR /&gt;&lt;BR /&gt;Try creating S899bbclient instead of S999bbclient.&lt;BR /&gt;&lt;BR /&gt;You can also create a run-level 4 for your HP-UX server.&lt;BR /&gt;&lt;BR /&gt;Check with "who -r" and change your default run-level after a reboot to 4.&lt;BR /&gt;&lt;BR /&gt;Regards MB.</description>
      <pubDate>Thu, 15 Sep 2005 03:37:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926253#M409064</guid>
      <dc:creator>Marcel Boogert_1</dc:creator>
      <dc:date>2005-09-15T03:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926254#M409065</link>
      <description>May be a problem with symbolic link ?&lt;BR /&gt;&lt;BR /&gt;# ls -la /sbin/rc3.d/S999bbclient&lt;BR /&gt;lrwxrwxrwx 1 root sys 21 Dec 28 2004 /sbin/rc3.d/S999bbclient -&amp;gt; sbin/init.d/bbclient&lt;BR /&gt;&lt;BR /&gt;Do this,&lt;BR /&gt;# rm -rf /sbin/rc3.d/S999bbclient&lt;BR /&gt;# cd /sbin/rc3.d/&lt;BR /&gt;# ln -s /sbin/init.d/bbclient S999bbclient&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Thu, 15 Sep 2005 03:45:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926254#M409065</guid>
      <dc:creator>Mugilvannan</dc:creator>
      <dc:date>2005-09-15T03:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926255#M409066</link>
      <description>Hi Julien,&lt;BR /&gt;&lt;BR /&gt;when customizing rc scripts on startup I always use /sbin/init.d/template. I should suggest you to start from the template and re-create your startup script based on that. Also it needs a configuration file under /etc/rc.config.d and I see that it's missing in your startup script.&lt;BR /&gt;&lt;BR /&gt;A lot of docs about how to configure it into ITRC forum:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=903953" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=903953&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Fabio</description>
      <pubDate>Thu, 15 Sep 2005 04:11:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926255#M409066</guid>
      <dc:creator>Fabio Ettore</dc:creator>
      <dc:date>2005-09-15T04:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926256#M409067</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;to get feedback at startup/shutdown, you have to implement the arguments&lt;BR /&gt;start_msg&lt;BR /&gt;stop_msg&lt;BR /&gt;&lt;BR /&gt;for your rc-script like&lt;BR /&gt;...&lt;BR /&gt;;;&lt;BR /&gt;start_smg) echo big brother client ;;&lt;BR /&gt;&lt;BR /&gt;Leave this message output in your&lt;BR /&gt;start)-block.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Thu, 15 Sep 2005 04:56:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926256#M409067</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2005-09-15T04:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926257#M409068</link>
      <description>We use bb as well - here's mine:&lt;BR /&gt;&lt;BR /&gt;# ll /sbin/init.d/bb&lt;BR /&gt;-rwxr-xr-x   1 bin        bin           1578 Jun  4  2004 /sbin/init.d/bb&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cat /sbin/init.d/bb&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;#&lt;BR /&gt;# @(#) $Revision: 1.0 $&lt;BR /&gt;#&lt;BR /&gt;# NOTE:    This script is not configurable!  Any changes made to this&lt;BR /&gt;#          scipt will be overwritten when you upgrade to the next&lt;BR /&gt;#          release of HP-UX.&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# Start Big Brother&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;PATH=/sbin:/usr/sbin:/usr/bin&lt;BR /&gt;export PATH&lt;BR /&gt;&lt;BR /&gt;rval=0&lt;BR /&gt;set_return() {&lt;BR /&gt;        x=$?&lt;BR /&gt;        if [ $x -ne 0 ]; then&lt;BR /&gt;                echo "ERROR CODE $x"&lt;BR /&gt;                rval=1&lt;BR /&gt;        fi&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;case $1 in&lt;BR /&gt;start_msg)&lt;BR /&gt;        echo "Starting BB monitoring."&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;stop_msg)&lt;BR /&gt;        echo "Stoping BB monitoring "&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;'start')&lt;BR /&gt;        if [ -f /etc/rc.config.d/bb ] ; then&lt;BR /&gt;                . /etc/rc.config.d/bb&lt;BR /&gt;        else&lt;BR /&gt;                echo "ERROR: /etc/rc.config.d/bb defaults file MISSING"&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;        if [ "$BB" -eq 1 ]; then&lt;BR /&gt;                su - bb -c "nohup /app/admin/bb/runbb.sh start /dev/null 2&amp;gt;&amp;amp;1" &amp;amp;&amp;amp; echo bb started&lt;BR /&gt;                set_return&lt;BR /&gt;        else&lt;BR /&gt;                rval=2&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;'stop')&lt;BR /&gt;        if [ -f /etc/rc.config.d/bb ] ; then&lt;BR /&gt;                . /etc/rc.config.d/bb&lt;BR /&gt;        else&lt;BR /&gt;                echo "ERROR: /etc/rc.config.d/bb defaults file MISSING"&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;        if [ "$BB" -eq 1 ]; then&lt;BR /&gt;                su - bb -c "/app/admin/bb/runbb.sh stop" &amp;amp;&amp;amp; echo bb stopped&lt;BR /&gt;                set_return&lt;BR /&gt;        else&lt;BR /&gt;                rval=2&lt;BR /&gt;        fi&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;*)&lt;BR /&gt;        echo "usage: $0 {start|stop}"&lt;BR /&gt;        ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;exit $rval&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cat /etc/rc.config.d/bb&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;# @(#) $Revision: 1.0 $&lt;BR /&gt;# BIG BROTHER configuration.&lt;BR /&gt;#&lt;BR /&gt;# BB:         Set to 1 to start bb monitoring.&lt;BR /&gt;#&lt;BR /&gt;BB=1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# ll /sbin/rc*/*bb*&lt;BR /&gt;lrwxr-xr-x   1 root       sys             12 Jun  4  2004 /sbin/rc2.d/K005bb -&amp;gt; ../init.d/bb&lt;BR /&gt;lrwxr-xr-x   1 root       sys             12 Jun  4  2004 /sbin/rc3.d/S995bb -&amp;gt; ../init.d/bb&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Sep 2005 09:02:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926257#M409068</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2005-09-15T09:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926258#M409069</link>
      <description>When a start/stop script doesn't seem to work, the first place to look is the start/stop log: /etc/rc.log where you'll see the start message (missing in your script) and any output from that script.&lt;BR /&gt;&lt;BR /&gt;There are actually two files to create: the start/stop script and the configure script. The configure script is stored in /etc/rc.config.d and usually named the same as the start/stop script. In it's simplest form, the configure script might just say:&lt;BR /&gt; &lt;BR /&gt;BBRUN=1&lt;BR /&gt; &lt;BR /&gt;and then in your start/stop script, you would test for BBRUN=1 to start the program (never test for BBRUN=1 for stopping it since it may be running and if you change BBRUN=0 for the next reboot, it won't be stopped during shutdown.&lt;BR /&gt; &lt;BR /&gt;The line:&lt;BR /&gt; &lt;BR /&gt;id=`/bin/ps -edf | /bin/grep bbc |/bin/grep -v bbclient|/bin/grep -v grep| /bin/awk '{print $2}'` &lt;BR /&gt; &lt;BR /&gt;might be somewhat protable between flaors of Unix but it is an awful way to find a process by name. It will return programs like bbc1 and userbbc and bbbccc. HP-UX has a very powerful ps command that eliminates grep completely and simplifies getting the details you want by using -o. Replace the id line above with:&lt;BR /&gt; &lt;BR /&gt;id=$(UNIX95= ps -C bbc -o pid=)&lt;BR /&gt; &lt;BR /&gt;This will have either an empty string (id="") if not bbc process is found, or a list of all the copies of bbc (b ut not bbcclient, etc).&lt;BR /&gt;&lt;BR /&gt;I have attached a heavily documented template file you can use to build a good start/stop script.</description>
      <pubDate>Thu, 15 Sep 2005 09:40:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926258#M409069</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-09-15T09:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926259#M409070</link>
      <description>The probleme was /etc/rc.config.d/bb&lt;BR /&gt;I didn't know this sort of config file,&lt;BR /&gt;on linux and solaris there is only one file in /etc/init.d/&lt;BR /&gt;But now, I know :)&lt;BR /&gt;Thanks a lot for all yours answers.</description>
      <pubDate>Thu, 15 Sep 2005 10:39:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926259#M409070</guid>
      <dc:creator>Pouponnot</dc:creator>
      <dc:date>2005-09-15T10:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: something special with hp-ux startup script ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926260#M409071</link>
      <description>.</description>
      <pubDate>Thu, 15 Sep 2005 10:39:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/something-special-with-hp-ux-startup-script/m-p/4926260#M409071</guid>
      <dc:creator>Pouponnot</dc:creator>
      <dc:date>2005-09-15T10:39:52Z</dc:date>
    </item>
  </channel>
</rss>

