From owner-freebsd-hackers Fri May 19 12:55:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 7DF0E37BF73 for ; Fri, 19 May 2000 12:55:12 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id NAA95020; Fri, 19 May 2000 13:55:11 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id NAA03169; Fri, 19 May 2000 13:54:20 -0600 (MDT) Message-Id: <200005191954.NAA03169@harmony.village.org> Subject: Re: Post-shutdown hook for UPS shutdown? Cc: Cillian Sharkey , Doug White , hackers@FreeBSD.ORG In-reply-to: Your message of "Fri, 19 May 2000 13:53:04 MDT." <200005191953.NAA03130@harmony.village.org> References: <200005191953.NAA03130@harmony.village.org> <20000519180525.A29385@psn.ie> <20000519170026.A29241@psn.ie> Date: Fri, 19 May 2000 13:54:20 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200005191953.NAA03130@harmony.village.org> Warner Losh writes: : You'd like have to hack the kernel. There are hooks in the kernel to : execute very late in the game. I even think there is one to do things : just before halt that you could use to power things off completely. : If this is a UPS, and the signal is several serial characters, you'd : have to poll the serial port rather than using interrupts (and you : should disable interrupts just in case). Actually, forget what I said. Mike smith's way is much cleaner. Assuming that the batteries have enough juice in them to do the reboot. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message