tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY - rc scripts
@ 1999-02-22 17:12 Leonard, Roger
  0 siblings, 0 replies; only message in thread
From: Leonard, Roger @ 1999-02-22 17:12 UTC (permalink / raw)
  To: tru64-unix-managers

I wrote:

> I am trying to get oracle and PeopleSoft to shutdown as part of the normal
> system shutdown and it does not appear to work.  I created a script that
> calls the proper shutdowns and put it in /sbin/init.d and then created S
and
> K links in rc2.d and rc3.d.  The startup in rc3.d works fine but the
system
> never executes the shutdown portion in rc2.d.  Running it manually through
> the links and issuing the start or stop arguments works fine.  When I do a
> shutdown -r now, the system immediately goes down and I can't see where it
> runs anything in rc2.d.  What am I missing? Currently the way I got it to
> work was to put a wrapper script around the /sbin/shutdown executable that
> shuts down the applications and then calls the real shutdown but this
seems
> kludgy.   Any help would be greatly appreciated.
> 

Summary:
I guess I am the only one who didn't read the shutdown manpage.  My
apologies.  However I got some conflicting answers, some suggesting to put
the links in rc2, and rc0.  It appears that Dr. Blinn summed it up when he
wrote:

What you have observed is the actual behavior of the "shutdown" command --
and
it's stated explicitly by the shutdown reference page, where it says:

  Alternatively, if you invoke shutdown with the -r, -h, or -k flag, the
com-
  mand executes the reboot command or the halt command, or avoids shutting
  the system down.  Note that the -h and -r flags use a broadcast kill
signal
  and not the run level transition scripts.  To use the run level transition
  scripts, execute the shutdown command without the -h or -r flag.  This
will
  bring the system down to single user mode.  From single user mode, execute
  shutdown with the -h or -r flag.  Alternatively, you can execute init 0
  which will bring the system from level 3 to the console prompt.

My problem is I want to be able to do unattended reboots and it is not
feasible to shutdown to single user and then do an init.  I created a
wrapper script that replaces and calls /sbin/shutdown that shuts down my
applications and I guess this will have to do.  Not pretty, but it gets the
job done.  Many thanks to the dozens of people who replied.  

Roger Leonard

  

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-02-22 17:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-02-22 17:12 SUMMARY - rc scripts Leonard, Roger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox