From owner-freebsd-questions@FreeBSD.ORG Tue May 23 04:20:13 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 147B816A429 for ; Tue, 23 May 2006 04:20:13 +0000 (UTC) (envelope-from petermatulis@yahoo.ca) Received: from web60020.mail.yahoo.com (web60020.mail.yahoo.com [209.73.178.68]) by mx1.FreeBSD.org (Postfix) with SMTP id 81A0543D46 for ; Tue, 23 May 2006 04:20:12 +0000 (GMT) (envelope-from petermatulis@yahoo.ca) Received: (qmail 54836 invoked by uid 60001); 23 May 2006 04:20:11 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=KsQTVMOUgnGGmt3CXPUV5tgKnL7T+DiXEWs59oLwVjYISynecmQo3GRLPR3iXJBklj99QOv7r1P0TRiM392hgX8vFls01KIYPU57x9OCl4etEDPGm8QCu5IIyIAze5SKklhYDI657RqD0DlUM5MM2oHNrGckqZuYOBhwgWRNZNc= ; Message-ID: <20060523042011.54834.qmail@web60020.mail.yahoo.com> Received: from [70.81.189.3] by web60020.mail.yahoo.com via HTTP; Tue, 23 May 2006 00:20:11 EDT Date: Tue, 23 May 2006 00:20:11 -0400 (EDT) From: Peter To: Scott Tuc Ellentuch at T-B-O-H In-Reply-To: <200605230406.k4N46IFI009839@himinbjorg.tucs-beachin-obx-house.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-questions Subject: Re: Anyone using sysutils/nut ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2006 04:20:13 -0000 --- Scott Tuc Ellentuch at T-B-O-H wrote: > > > > > > --- Scott Tuc Ellentuch at T-B-O-H wrote: > > > > > Hi, > > > > > > I'd like to find out where to put the "upsdrvctl shutdown" in > the > > > shutdown process. Putting it in rc.shutdown causes me to have > dirty > > > filesystems constantly that sometimes don't allow the system to > come > > > up. > > > > You don't. Instead, use the nut configuration files (ups.conf, > > upsd.conf, upsmon.conf, hosts.conf, upsd.users). upsdrvctl is > called > > internally from upsd. That is how I understand it. > > > I'm going by : > > /usr/local/share/doc/nut/shutdown.txt > > Subsection "How you set it up", item #2 : > > 2. Edit your shutdown scripts to check for the POWERDOWNFLAG so they > know > when to power off the UPS. You must check for this file, as you > don't > want this to happen during normal shutdowns! > > You can use upsdrvctl to start the shutdown process in your UPS > hardware. Use this script as an example, but change the paths to > suit your system: My bad. I did edit rc.shutdown on both a 5.4 and a 6.0 system with no troubles. The end of my file shows this: # Inserted next 5 lines March 13, 2006 for UPS shutdown. if (test -f /etc/killpower) then echo "Killing the power, bye!" /usr/local/libexec/nut/upsdrvctl shutdown fi echo '.' exit 0 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com