From owner-freebsd-questions Fri Jul 19 23:25:24 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA17843 for questions-outgoing; Fri, 19 Jul 1996 23:25:24 -0700 (PDT) Received: from gdi.uoregon.edu (cisco-ts17-line13.uoregon.edu [128.223.150.230]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id XAA17838 for ; Fri, 19 Jul 1996 23:25:21 -0700 (PDT) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.7.5/8.6.12) with SMTP id XAA00326; Fri, 19 Jul 1996 23:22:51 -0700 (PDT) Date: Fri, 19 Jul 1996 23:22:51 -0700 (PDT) From: Doug White Reply-To: dwhite@resnet.uoregon.edu To: "Eloy A. Paris" cc: questions@freebsd.org Subject: Re: Script run at shutdown? In-Reply-To: <2.2.16.19960719112832.3e671e4c@zeus.ven.ra.rockwell.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Fri, 19 Jul 1996, Eloy A. Paris wrote: > Is there any way to run a script at shutdown, like after invoking the > commands shutdown, reboot or halt? Not really, that I know of. You could build a shell script that does what you need then runs shutdown. > In Linux you can do so in the script rc.0 which takes care of unmounting > file systems and maintenance stuff like that. The act of shutting down takes care of all that. > I need this because the very last thing I want to do after the system is > ready to die is to tell my UPS to kill power to preserve batteries. Someone asked about this already. If the UPS can "kill power" without turning off the power to the system, then you could use a script. But if that actually flips the power switch then hm. Why would your UPS burn batteries if the computer is turned off? UPSs should _never_ be turned off as it'll keep the batteries fresh & tested. Turning it off would allow the batteries to drain. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major