From owner-freebsd-hackers Fri May 19 9:32:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (Postfix) with ESMTP id A788737BEF9 for ; Fri, 19 May 2000 09:30:53 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.10.1/8.10.1) with ESMTP id e4JGUmc16770; Fri, 19 May 2000 09:30:48 -0700 (PDT) Date: Fri, 19 May 2000 09:30:48 -0700 (PDT) From: Doug White To: Cillian Sharkey Cc: hackers@FreeBSD.ORG Subject: Re: Post-shutdown hook for UPS shutdown? In-Reply-To: <20000519170026.A29241@psn.ie> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 19 May 2000, Cillian Sharkey wrote: > Hi Folks, > > I need to execute a script (which tells the UPS to turn off) *after* the > system has come to a safe halt from shutdown -h. I can't place the commands > in /etc/rc.shutdown because this is too early in the shutdown sequence. > > Unfortunately, the UPS in question (APC Back-UPS 650) is not a "smart" one, > (i.e. it doesn't have an in-built delay when a shutdown signal is received > which gives time for all attached devices to shutdown) and I'm pretty much > stuck with it. The software is the Network UPS Tools (NUT) package. To do anything that late you'd have to hack the kernel. I believe APC's units have a 'time-delay shutdown' line that you can throw as late as possible and it'll give you 10 seconds to get all the way down. I'm not sure about the BackUPSs tho. The other option is to not bother turning off the UPS; you're safe one you're halted. That or try turning the machine itself off if apm and shutdown -p can do it. Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message