From owner-freebsd-hackers Tue Mar 25 20:36:08 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id UAA13602 for hackers-outgoing; Tue, 25 Mar 1997 20:36:08 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id UAA13597 for ; Tue, 25 Mar 1997 20:36:05 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id VAA26953; Tue, 25 Mar 1997 21:21:33 -0700 From: Terry Lambert Message-Id: <199703260421.VAA26953@phaeton.artisoft.com> Subject: Re: How to add extra shutdown code? To: danny@panda.hilink.com.au (Daniel O'Callaghan) Date: Tue, 25 Mar 1997 21:21:33 -0700 (MST) Cc: jfesler@calweb.com, hackers@FreeBSD.ORG In-Reply-To: from "Daniel O'Callaghan" at Mar 26, 97 12:13:23 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Hmm, I don't see how to do this under FreeBSD (too easy under Slowlaris ;-). > > Is there any way I can have a script ran at stutdown? I have some stuff > > that needs to run at shutdown time (versus after reboot). > > shutdown -r execs /sbin/reboot and shutdown -h execs /sbin/halt. > > You could replace each of those programs with a shell script which does > stuff you want and then calls /sbin/halt.real, or /sbin/reboot.real > > Might be a nice addition to the system to have an rc.halt which is > processed by halt and reboot if it exists, though. Check the -hackers list archives; there have been a number of positings of "rc.shutdown" patches for init. I believe that the most recent one was "Message-ID: ", which was posted on "Sun, 12 Jan 1997 16:03:14 +0100" by Ollivier Robert, email address roberto@keltia.freenix.fr Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.