From owner-freebsd-questions Thu Jan 1 14:47:25 1998 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA15015 for questions-outgoing; Thu, 1 Jan 1998 14:47:25 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from gdi.uoregon.edu (cisco-ts7-line3.uoregon.edu [128.223.150.50]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA15008 for ; Thu, 1 Jan 1998 14:47:20 -0800 (PST) (envelope-from dwhite@gdi.uoregon.edu) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.7/8.8.8) with SMTP id OAA22661; Thu, 1 Jan 1998 14:46:56 -0800 (PST) (envelope-from dwhite@gdi.uoregon.edu) Date: Thu, 1 Jan 1998 14:46:56 -0800 (PST) From: Doug White X-Sender: dwhite@localhost Reply-To: Doug White To: Leif Neland cc: freebsd-questions@FreeBSD.ORG Subject: Re: /etc/shutdown.d not in bsd In-Reply-To: <7a5_9801012220@swimsuit.swimsuit.roskildebc.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On 1 Jan 1998, Leif Neland wrote: > Being used to /etc/shutdown.d in SysV, I can't understand BSD can do without > it. > > In sysV, /etc/shutdown.d contains scripts to shutdown system services etc. at > shutdown in a proper and orderly way; the scripts are executed in alfabetical > order. Because the system will shut them down for you. When the system is halted, every process is sent a SIGTERM (signal 15). most processes will then exit gracefully. (Some evil ones that mask SIGTERM then get a SIGKILL to finish them off). > What would one do to ensure e.g. first the application using the database is > shutdown, then the database itself is shutdown. 1. exit application 2. issue shutdown command > Init, or the shutdown-command sends kill -15 to all running processes, the man > says, but it doesn't say in which order. All simultaneously, I think. > Am I the only one missing a neat way to do it, or do you folks out there never > stop your servers? :-) We hope we never have to. :-) > Could, and would somebody implement a sysV-like shutdown.d, just as there > exists a dir (or more) to start scripts at startup? I don't want to have to > have a special script I have to remember to call instead just shutdown, reboot > and halt. > Or would this be blasfemous(sp?) against the BSD-belief to do such a > sysV-thing? We've told you three or four times to just use a script that kills the appropriate program(s) then calls shutdown. If you want to implement it, go for it; send patches using send-pr. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major