From owner-freebsd-hackers Fri May 19 12:54: 2 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 BA3F137BF9B for ; Fri, 19 May 2000 12:53:57 -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 NAA94999; Fri, 19 May 2000 13:53:55 -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 NAA03130; Fri, 19 May 2000 13:53:04 -0600 (MDT) Message-Id: <200005191953.NAA03130@harmony.village.org> To: Cillian Sharkey Subject: Re: Post-shutdown hook for UPS shutdown? Cc: Doug White , hackers@FreeBSD.ORG In-reply-to: Your message of "Fri, 19 May 2000 18:05:25 BST." <20000519180525.A29385@psn.ie> References: <20000519180525.A29385@psn.ie> <20000519170026.A29241@psn.ie> Date: Fri, 19 May 2000 13:53:04 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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). Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message