Is there something like 'shutdownrc' at SunOS 4.1 ?
Ross Parker
parker at mprgate.mpr.ca
Tue May 28 09:18:43 AEST 1991
In article <1991May25.122537.19449 at thunder.mcrcim.mcgill.edu>, mouse at thunder.mcrcim.mcgill.edu (der Mouse) writes:
|> In article <138 at speedy.ada.cci.de>, smeets at speedy.ada.cci.de (Vincent Smeets) writes:
|>
|> > 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
|> new: mouse at larry.mcrcim.mcgill.edu
--
Ross Parker | Why do they put me down?
| Make out that I'm a clown?
parker at mprgate.mpr.ca | I drink scotch whisky all day long
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
More information about the Comp.unix.admin
mailing list