From owner-freebsd-hackers Tue Mar 25 16:59:26 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id QAA27860 for hackers-outgoing; Tue, 25 Mar 1997 16:59:26 -0800 (PST) Received: from panda.hilink.com.au (panda.hilink.com.au [203.2.144.5]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA27854 for ; Tue, 25 Mar 1997 16:59:19 -0800 (PST) Received: (from danny@localhost) by panda.hilink.com.au (8.8.5/8.7.3) id MAA22444; Wed, 26 Mar 1997 12:13:24 +1100 (EST) Date: Wed, 26 Mar 1997 12:13:23 +1100 (EST) From: "Daniel O'Callaghan" To: Jason Fesler cc: hackers@FreeBSD.ORG Subject: Re: How to add extra shutdown code? In-Reply-To: <3.0.1.32.19970325152304.00a22800@pop.calweb.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Tue, 25 Mar 1997, Jason Fesler wrote: > 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. Danny