|> > I am using SunOS 4.1 and I want to execute some commands just before
|> > the system is going down (shuting down Oracle and Teamwork).
|> That's why shutting down sends a SIGTERM to everything. Processes that
|> need to clean up after themselves should catch it and do whatever they
|> feel they must.
Definitely... unfortunately, init isn't as smart as we'd all like at times...
(see next comment...)
|> Not that I know of. If the commands in question execute fairly
|> quickly, you could write a daemon which sleeps waiting for a SIGTERM
|> and then runs whatever needs to be run.
Unfortunately, init will not wait for all processes to die... only ones
that it deems worthy of it's attention. I went through this exact problem
a couple of months ago (trying to shut down Oracle), and eventually gave
up. I had tried what you suggest - init will blast a SIGTERM at the daemon,
but it will merrily continue on and take the system down. Databases take
toooooo long to shut down!
|> der Mouse
|> old: mcgill-vision!mouse
Ross Parker | Why do they put me down?
| Make out that I'm a clown?
uunet!ubc-cs!mprgate!parker | Yeah I'm gonna save my money
| (gonna put it all away...)
(604)293-5495 | 'Cause I'm a Scotsman