From owner-freebsd-hackers Fri May 19 10: 9: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mailhub.psn.ie (mailhub.psn.ie [194.106.150.254]) by hub.freebsd.org (Postfix) with ESMTP id 6632537BF34 for ; Fri, 19 May 2000 10:08:52 -0700 (PDT) (envelope-from cns@psn.ie) Received: from alto ([192.168.0.254] helo=alto.internal) by mailhub.psn.ie with esmtp (Exim 3.12 #2) id 12sqDF-000CUY-00; Fri, 19 May 2000 18:05:25 +0100 Received: from cns by alto.internal with local (Exim 3.12 #1) id 12sqDF-0007h8-00; Fri, 19 May 2000 18:05:25 +0100 Date: Fri, 19 May 2000 18:05:25 +0100 From: Cillian Sharkey To: Doug White Cc: hackers@freebsd.org Subject: Re: Post-shutdown hook for UPS shutdown? Message-ID: <20000519180525.A29385@psn.ie> References: <20000519170026.A29241@psn.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from dwhite@resnet.uoregon.edu on Fri, May 19, 2000 at 09:30:48AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 19 May 2000, Doug White wrote: > On Fri, 19 May 2000, Cillian Sharkey wrote: > > 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. > > To do anything that late you'd have to hack the kernel. Hmm, thought so. However if all filesystems are unmounted after disks are synced, wouldn't that make the software (kept in /usr/local) un-available..? > 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. That's right - BackUPSs don't have the feature; they shutdown the moment they get the signal. > 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. I considered this, but we need unattended shutdown when power goes / reboot when power comes back. If the power cut was long enough, the UPS battery would soon cut out and the machines would bootup correctly when the power comes back, however this doesn't work if the power comes on before the battery has fully discharged.. -- Cillian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message