From owner-freebsd-questions Thu Feb 6 22:33:52 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id WAA08518 for questions-outgoing; Thu, 6 Feb 1997 22:33:52 -0800 (PST) Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.170.28]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA08511 for ; Thu, 6 Feb 1997 22:33:49 -0800 (PST) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.8.3/8.6.12) with SMTP id WAA15997; Thu, 6 Feb 1997 22:33:40 -0800 (PST) Date: Thu, 6 Feb 1997 22:33:40 -0800 (PST) From: Doug White To: stevel cc: freebsd-questions@freebsd.org Subject: Re: UPS daemon In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk -Hackers cc pruned. On Tue, 4 Feb 1997, stevel wrote: > Is there anyone working on a generic UPS daemon? I know someone is > working on one specifically for APC Smart UPS's, but this isn't usefull to > the majority of people. We mostly have "non-smart", TrippLite's and APC > out there right? Tripplite BC series, OmniPro series / APC BackUPS > series. The wildwind upsd is built to be modular. depending on how your UPS does it's signalling (you'll need to get the specs for this) it shouldn't be too difficult to hack something into the existing frame. ww upsd is pretty simple, the nasty logic is in the APC support. > I would like to write a UPSd in C++, but I don't have enough knowledge of > serial programming yet. Also, I would like some input about how the > FreeBSD startup, and shutdown events happen. I am very familiar with the > SYSV style startup/shutdown as implemented in RedHat Linux, and how > sysvinit supports power event signals. What is the corollary in BSD? As > far as I'm concerned, I don't even want to have to mess with init. I'd > like to do my own shutdowns, and cancelations? Um, well, not much. SysV and BSD are about as different as butter and chocolate. You'd have to poke the source, the hackers list, or Design & Imp. of 4.4BSD to find out the gory details. You could just call shutdown(8), but then your program has to run setgid operator. If you haven't taken the opportunity, check out ftp://ftp.ww.net/pub/wildwind/upsd. Full src included. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major