Xref: utzoo comp.unix.admin:2001 comp.unix.questions:31724 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!zaphod.mps.ohio-state.edu!mips!atha!aunro!alberta!ubc-cs!mprgate.mpr.ca!mprgate.mpr.ca!parker From: parker@mprgate.mpr.ca (Ross Parker) Newsgroups: comp.unix.admin,comp.unix.questions Subject: Re: Is there something like 'shutdownrc' at SunOS 4.1 ? Message-ID: <1991May27.231843.17196@mprgate.mpr.ca> Date: 27 May 91 23:18:43 GMT References: <138@speedy.ada.cci.de> <1991May25.122537.19449@thunder.mcrcim.mcgill.edu> Sender: news@mprgate.mpr.ca Organization: MPR Teltech Ltd. Lines: 37 In article <1991May25.122537.19449@thunder.mcrcim.mcgill.edu>, mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes: |> In article <138@speedy.ada.cci.de>, smeets@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@larry.mcrcim.mcgill.edu -- Ross Parker | Why do they put me down? | Make out that I'm a clown? parker@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