smeets@speedy.ada.cci.de (Vincent Smeets) (05/23/91)
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). Is there something like a 'shutdownrc' file that will be executed wenn the shutdowntime has elapsed? I have looked at the 'shutdown' program itself, but that is no shellscript so I can't change anything. Please use mail to replay to me, because news has to catch up 2 weeks. :-{ Thanks in advance, V. Smeets
mouse@thunder.mcrcim.mcgill.edu (der Mouse) (05/25/91)
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. If Oracle and/or Teamwork doesn't do this, file a bug report with the vendor. If you're paying for support, *demand* a fix. > Is there something like a 'shutdownrc' file that will be executed > wenn the shutdowntime has elapsed? 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. > I have looked at the 'shutdown' program itself, but that is no > shellscript so I can't change anything. Dontcha just love them binary-only distributions? (Biggest gripe I have with Sun on this point, at the moment, is add_client....) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu
parker@mprgate.mpr.ca (Ross Parker) (05/28/91)
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