<?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: restarting init.d script without rebooting in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790781#M79616</link>
    <description>Hi Kelli,&lt;BR /&gt;&lt;BR /&gt; Appears only the sshd daemon has an explicit restart sequence out of the box. Although others like swagentd can be restarted with parms on the command line. (swagentd -r).&lt;BR /&gt;But it would be fairly straightforward to set up a restart case value in any - as long as they can be stopped/started normally.&lt;BR /&gt;See /sbin/init.d/sshd2 for an example.&lt;BR /&gt;&lt;BR /&gt;BTW - New hat looks good!!&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
    <pubDate>Wed, 21 Aug 2002 19:56:56 GMT</pubDate>
    <dc:creator>Jeff Schussele</dc:creator>
    <dc:date>2002-08-21T19:56:56Z</dc:date>
    <item>
      <title>restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790768#M79603</link>
      <description>Is there anyway to simulate a reboot and have scripts called again in rc3.d without actually having to reboot?&lt;BR /&gt;&lt;BR /&gt;I know I can do this, but I can't seem to locate the reference.</description>
      <pubDate>Wed, 21 Aug 2002 11:45:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790768#M79603</guid>
      <dc:creator>Allan Pincus</dc:creator>
      <dc:date>2002-08-21T11:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790769#M79604</link>
      <description>Allan,&lt;BR /&gt;&lt;BR /&gt;Sure, just do "/sbin/init.d/SCRIPTNAME start"&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 21 Aug 2002 11:47:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790769#M79604</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-08-21T11:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790770#M79605</link>
      <description>Yes, I've done that, but I found that it does not emulate a reboot.  Seems that my script will launch that way, but not at reboot.  I'm having an odd problem.&lt;BR /&gt;&lt;BR /&gt;Thanks for this input!</description>
      <pubDate>Wed, 21 Aug 2002 11:48:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790770#M79605</guid>
      <dc:creator>Allan Pincus</dc:creator>
      <dc:date>2002-08-21T11:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790771#M79606</link>
      <description>Hi Allan,&lt;BR /&gt;&lt;BR /&gt; What errors, if any, are you getting in the /etc/rc.log file when these scripts don't start?&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 21 Aug 2002 11:50:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790771#M79606</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-08-21T11:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790772#M79607</link>
      <description>None!!!!!&lt;BR /&gt;&lt;BR /&gt;I see the script start, with no errors.  I've had the script spit out everything to /etc/rc.log, with no problems.&lt;BR /&gt;&lt;BR /&gt;Now I'm trying to start my script with nohup, just to see if it works.&lt;BR /&gt;&lt;BR /&gt;When I run the Start script (S101&lt;NAME&gt;) from rc3.d it works fine.  At reboot, I get the start up message, but the process isn't there.&lt;BR /&gt;&lt;BR /&gt;Weird.&lt;/NAME&gt;</description>
      <pubDate>Wed, 21 Aug 2002 11:55:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790772#M79607</guid>
      <dc:creator>Allan Pincus</dc:creator>
      <dc:date>2002-08-21T11:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790773#M79608</link>
      <description>Hi Allan,&lt;BR /&gt;&lt;BR /&gt;You can try bringing the server down to the run level below the one you want to run the scripts for - i.e. 2 in this case - but it can be just as catastrophic for the applications as a reboot and may not clean up properly:&lt;BR /&gt;   init 2&lt;BR /&gt;   init 3&lt;BR /&gt;&lt;BR /&gt;Don't know if that's of any use???&lt;BR /&gt;&lt;BR /&gt;Ollie.</description>
      <pubDate>Wed, 21 Aug 2002 11:57:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790773#M79608</guid>
      <dc:creator>Ollie R</dc:creator>
      <dc:date>2002-08-21T11:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790774#M79609</link>
      <description>Do you have a config file for this process in /etc/rc.config.d ?&lt;BR /&gt;&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 21 Aug 2002 11:58:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790774#M79609</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-08-21T11:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790775#M79610</link>
      <description>make sure your shell is &lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;&lt;BR /&gt;or whatever you have from&lt;BR /&gt;&lt;BR /&gt;echo $SHELL (when you are successful</description>
      <pubDate>Wed, 21 Aug 2002 12:09:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790775#M79610</guid>
      <dc:creator>Jim Butler</dc:creator>
      <dc:date>2002-08-21T12:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790776#M79611</link>
      <description>Have you stopped the service before starting it again? I would run /sbin/init.d/SCRIPTNAME stop&lt;BR /&gt;then&lt;BR /&gt;/sbin/init.d/SCRIPTNAME start&lt;BR /&gt;&lt;BR /&gt;Good Luck.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 21 Aug 2002 16:43:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790776#M79611</guid>
      <dc:creator>Steve Labar</dc:creator>
      <dc:date>2002-08-21T16:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790777#M79612</link>
      <description>Hi Allan:&lt;BR /&gt;&lt;BR /&gt;If you script works when you manually launch it but not during bootup, I'd look to differences in the environment.  Make sure that you have a PATH declaration in your script along with any other variables that you would "normally" have if your $HOME/.profile had been sourced.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 21 Aug 2002 16:48:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790777#M79612</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-08-21T16:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790778#M79613</link>
      <description>Hi Allan,&lt;BR /&gt;&lt;BR /&gt;I had the same problems before, and I got some hint from this forum. It seemed that if the App/process you are trying to bring up from /sbin/init.d at boot time is not a Daemon, it won't last. That's why even though you saw everything is fine from /etc/rc.log, still it's not up, because it exit after 1 or 2 seconds. &lt;BR /&gt;&lt;BR /&gt;To solve this problem, there're 2 ways:&lt;BR /&gt;&lt;BR /&gt;1. write your wrapper scripts, put what ever in the /sbin/init.d/your-script start part in this wrapper, and make it a daemon, then call this wrapper from /sbin/init.d/your-script&lt;BR /&gt;&lt;BR /&gt;2. write a script, put all the start-up part from your origenal script into this script, and put it somewhere else, say "/", then in the /sbin/init.d/your-script start part, instead of calling this new script directly, using "at" command to schedule it start after 5 or 10 mins ( depend on how long the whole system will start up normally), then it will start with normal way -- like you did to call this script from command line.&lt;BR /&gt;&lt;BR /&gt;the 2nd solution is simple, the key is to make the proper time for "at" command, so that it will start soon after the system is booted. But if there's other Apps you put at /sbin/init.d which have dependency on this App , you can only use solution 1.&lt;BR /&gt;&lt;BR /&gt;hope it helps,&lt;BR /&gt;Gary</description>
      <pubDate>Wed, 21 Aug 2002 17:51:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790778#M79613</guid>
      <dc:creator>Gary Yu</dc:creator>
      <dc:date>2002-08-21T17:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790779#M79614</link>
      <description>Verify all your PATH and environment variables aer set correctly in your startup scripts.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Marty</description>
      <pubDate>Wed, 21 Aug 2002 18:35:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790779#M79614</guid>
      <dc:creator>Martin Johnson</dc:creator>
      <dc:date>2002-08-21T18:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790780#M79615</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If I understand your question correctly:&lt;BR /&gt;&lt;BR /&gt;You can start up a script manually by /sbin/init.d/&amp;lt;scriptname&amp;gt; start/stop&lt;BR /&gt;&lt;BR /&gt;However, some scripts depend on others to be started in a particular order in order to run properly. Also, some scripts don't like to be "start"ed without being "stop"ped first.&lt;BR /&gt;&lt;BR /&gt;For example, /sbin/init.d/net will be annoyed if /sbin/init.d/hostname wasn't run first.&lt;BR /&gt;&lt;BR /&gt;The best way to figure the safest way to start a daemon process is to figure what it depends on (if applicable) and in what order and follow it.&lt;BR /&gt;&lt;BR /&gt;Open question - I just now thought about this. Linux has a restart option in many of it's /etc/init.d scripts. Does HP-UX? I've never thought to try it.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Kel</description>
      <pubDate>Wed, 21 Aug 2002 19:43:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790780#M79615</guid>
      <dc:creator>Kelli Ward</dc:creator>
      <dc:date>2002-08-21T19:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790781#M79616</link>
      <description>Hi Kelli,&lt;BR /&gt;&lt;BR /&gt; Appears only the sshd daemon has an explicit restart sequence out of the box. Although others like swagentd can be restarted with parms on the command line. (swagentd -r).&lt;BR /&gt;But it would be fairly straightforward to set up a restart case value in any - as long as they can be stopped/started normally.&lt;BR /&gt;See /sbin/init.d/sshd2 for an example.&lt;BR /&gt;&lt;BR /&gt;BTW - New hat looks good!!&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 21 Aug 2002 19:56:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790781#M79616</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-08-21T19:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790782#M79617</link>
      <description>Hi Allan,&lt;BR /&gt;I'm sorry, I wasn't giving your question my full attention. I read the rc3.d comment and then ignored it in my note.&lt;BR /&gt;&lt;BR /&gt;The easiest way might possible be to write a script that starts all the scripts linked in rc3.d and test it on a non production unit first to help ensure as little risk of problems as possible. &lt;BR /&gt;&lt;BR /&gt;I know of no builtin way accomplish this.&lt;BR /&gt;&lt;BR /&gt;Also - I received a usage statement when I attempted "restart" on a process for grins.&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;&lt;BR /&gt;Kel&lt;BR /&gt;N/A for this one please.</description>
      <pubDate>Wed, 21 Aug 2002 20:19:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790782#M79617</guid>
      <dc:creator>Kelli Ward</dc:creator>
      <dc:date>2002-08-21T20:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790783#M79618</link>
      <description>Jeff - Thanks for the info and compliment.&lt;BR /&gt;This hat's pretty comfortatble. I like it.&lt;BR /&gt;I'm looking forward to trying on the pointy one.&lt;BR /&gt;Kel</description>
      <pubDate>Wed, 21 Aug 2002 20:24:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790783#M79618</guid>
      <dc:creator>Kelli Ward</dc:creator>
      <dc:date>2002-08-21T20:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790784#M79619</link>
      <description>Allan,&lt;BR /&gt;&lt;BR /&gt;your original question is, how to "simulate" a reboot without actually reboot the system. This can be done by changing to the single user mode and than going back to the run-level you like. The system actually does no reboot:&lt;BR /&gt;# shutdown 0  #  change to single user mode&lt;BR /&gt;# init 3      #  change to run level 3 (rc3.d)&lt;BR /&gt;&lt;BR /&gt;All the init.d scripts have been stopped and started again without reboot.&lt;BR /&gt;&lt;BR /&gt;When you are writing the startup script by your own, you have to be very careful. Not just start any program and expecting it is there. Do also check if the desired programs are there where they are expected, check if they can be executed, check if all necessary configurations are done (best to do inside /etc/rc.config.d), check what the exit values of the started programs are. You have to program your startup message by your own, in your startup script you have to decide when your startup message has been appended with an "OK", "FAIL", or "N/A". Check if your desired process is really running after executing the main part of your startup script, if not your startup script has to exit with returning 1.</description>
      <pubDate>Thu, 22 Aug 2002 09:38:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790784#M79619</guid>
      <dc:creator>Thomas Schler_1</dc:creator>
      <dc:date>2002-08-22T09:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790785#M79620</link>
      <description>It seems to me that your script probably *does* start "the process", but then the process dies, but you don't know it/why.&lt;BR /&gt;&lt;BR /&gt;If that is the (suspected) scenario, then - assuming that you normally start "the process" as "/path/to/the_process &amp;amp;" -, start "the process" as follows:&lt;BR /&gt;&lt;BR /&gt;[stuff in your script]&lt;BR /&gt;nohup /path/to/the_process &amp;amp;1 &amp;gt;&amp;gt;/the_process.log &amp;amp;&lt;BR /&gt;sleep 10&lt;BR /&gt;ps -ef | grep the_process &amp;gt;&amp;gt;/the_process.log&lt;BR /&gt;&lt;BR /&gt;The nohup(1) is a safeguard in case the_process is not a real daemon, i.e. it will die when the (shell executing the) script terminates.&lt;BR /&gt;&lt;BR /&gt;The redirection is to catch all messages.&lt;BR /&gt;&lt;BR /&gt;The sleep(1) is to allow nohup(1) time to do its work, i.e. a "nohup .... &amp;amp;" at the end of the script is likely to fail because the script will terminate before nohup(1) has been able to do its work (ignoring SIGHUP and SIGQUIT).&lt;BR /&gt;&lt;BR /&gt;The ps(1) is to make sure that the_process has really started.&lt;BR /&gt;&lt;BR /&gt;If you need more help, then please post your script and the logs.</description>
      <pubDate>Thu, 22 Aug 2002 11:28:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790785#M79620</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2002-08-22T11:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790786#M79621</link>
      <description>About testing without a reboot, do:&lt;BR /&gt;&lt;BR /&gt;# echo "your_manual_command" | batch&lt;BR /&gt;&lt;BR /&gt;Where "your_manual_command" is the full path/command which you successfully execute from an interactive shell.&lt;BR /&gt;&lt;BR /&gt;Other test:&lt;BR /&gt;# your_manual_command&lt;BR /&gt;[check if it ran OK and the daemon is running]&lt;BR /&gt;# exit&lt;BR /&gt;login: ...&lt;BR /&gt;...&lt;BR /&gt;[check if the daemon is *still* running]&lt;BR /&gt;&lt;BR /&gt;If the daemon *was* running, but no longer *is* running, then it is not a real daemon, i.e. it can not handle that (the shell that executes) the calling script terminates, i.e. you *must* use nohup(1) (see my previous response).</description>
      <pubDate>Thu, 22 Aug 2002 11:35:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790786#M79621</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2002-08-22T11:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: restarting init.d script without rebooting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790787#M79622</link>
      <description>I also ran into this, and as a previous poster indicated, adding a "sleep 10" statement to the startup commands was effective. Some things need more time to 'simmer' before they are done. :)</description>
      <pubDate>Thu, 22 Aug 2002 12:28:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/restarting-init-d-script-without-rebooting/m-p/2790787#M79622</guid>
      <dc:creator>Mark Landin</dc:creator>
      <dc:date>2002-08-22T12:28:06Z</dc:date>
    </item>
  </channel>
</rss>

