SUMMARY: Shutodwn with executing the stop entry point of the run -level transition scripts

From: Schwarzkugler, Bernd <Bernd_Schwarzkugler_at_ibex-ag.de>
Date: Tue, 06 Feb 2001 13:52:06 +0100

Shutdown in Tru64 UNIX with executing the stop entry point of the run-level
transition scripts in
/sbin/rc[023].d/[Knn_name]

I would thank these brave people for replaying to my question.

Dr. Thomas.Blinn
John Venier
Davis, Alan
Calvin Coghlan
Tom Webster
alan
Eric M. Sisson
O'Brien, Pat
Alia
Nikola Milutinovic



- shutdown behavior in general

(From Davis, Alan)
The issue here is that the boot process for Tru64 UNIX is sysV-like,
but the shutdown command (until recently) behaved only as BSD-like.

The broadcast kill signal is intended to signal all running processes
to die as part of the BSD shutdown. It doesn't run the kill scripts,
since they are a sysV feature. Unfortunately, the sysV init 0 process
isn't as flexible as shutdown in that it doesn't allow an autoreboot.

The solution that I use is to script the Oracle shutdown, including
checks to make sure that each database facility shuts down cleanly.
If any part fails to stop properly the system shutdown is aborted.
This ensures that the database isn't crashed by the system shutdown.
I receive a page on any startup or stop failure.

Once the database and all applications are stopped cleanly, then I
call shutdown.



- shutdown in Tru64 UNIX Version 4.0x

(From Dr. Thomas Blinn)
You're right, there is no good way to do this in V4.0x. I'd have to dig
into the kernel to understand exactly how the "-h" is implemented in the
V4.0x code, but for all intents and purposes, yes, a SIGTERM is sent to
each process. I *think* a SIGHUP is sent first, or something else less
abortive, and then if the process doesn't go away in a timely manner, a
SIGKILL is sent. But it's a big hammer.

Using "init 0" or just "shutdown" is nice, but that doesn't halt the box,
unless you have modified the inittab or created a "last thing to run in
the rc0.d K list" script that magically halts the system instead of just
letting init bring it to single user mode. (Actually, having something
in root's .profile might do the trick; if some particular file is found
in the root file system, then remove the file and halt the system, after
making sure the file is really gone -- be sure to sync the root file
system.)

(From Calvin Coghlan)
In version 4.x to run the transition scripts requires init 0. Issuing
shutdown will cause
all processes to be terminated without prejudice (sigterm). Thus for a
clean shutdown you
should init 0 and then shutdown -h. There are ways to work with this:
create a new command
 that does this, and then alias it to shutdown.


- shutdown in Tru64 UNIX Version 5x

(From Eric Sisson)
Therefore, it does appear that "shutdown -hs" would work. I am
satisfied with "init 0" and will remain with it.


(From Tom Webster)
If you want to cleanly shutdown to a halt state (init 0), you will need
to use one of the following commands:

init 0
shutdown -hs now

If you want to reboot the system cleanly, your only choice is to use
"shutdown -rs now" as Tru64 does not support runlevel 6 (reboot)
out of the box. (It is possible to build your own runlevel 6, but
it isn't supported by Compaq.)




Have fun

 Bernd Schwarzkugler
UNIX system engineer
IBEX AG / Germany
Received on Tue Feb 06 2001 - 12:53:48 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT