From owner-freebsd-questions Fri Sep 27 12:19: 5 2002 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 C303837B401 for ; Fri, 27 Sep 2002 12:19:04 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02FE943E3B for ; Fri, 27 Sep 2002 12:19:04 -0700 (PDT) (envelope-from swear@attbi.com) Received: from localhost.localdomain ([12.242.158.67]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020927191903.TXFQ6431.sccrmhc01.attbi.com@localhost.localdomain>; Fri, 27 Sep 2002 19:19:03 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id g8RJLG3q013676; Fri, 27 Sep 2002 12:21:17 -0700 (PDT) (envelope-from swear@attbi.com) Received: (from jojo@localhost) by localhost.localdomain (8.12.5/8.12.5/Submit) id g8RJLAd1013673; Fri, 27 Sep 2002 12:21:10 -0700 (PDT) (envelope-from swear@attbi.com) X-Authentication-Warning: localhost.localdomain: jojo set sender to swear@attbi.com using -f To: Petri Riihikallio Cc: freebsd-questions@freebsd.org Subject: Re: How to shut down cleanly by killing power References: <87elbf1r7d.fsf@pooh.int> From: swear@attbi.com (Gary W. Swearingen) Date: 27 Sep 2002 12:21:10 -0700 In-Reply-To: Message-ID: <4rvg4r5jdl.g4r@localhost.localdomain> Lines: 15 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > This way the system reboots, but the reboot is interrupted with > powerdown at early stage. Not ideal, I agree, but a solution still. And it has the side-benefit of nicely handling the fairly common case of where the power comes back on just long enough to get your UPS going again, especially if it doesn't have enough power to get you through one or more whole reboot-fsck-multi-user-UPS-shutdown cycles. (It's hard to restart a whole mains power grid and it often doesn't work the first time, as another poster indicated.) Of course you could do the start-of-rc thing no matter how you handle the shutdown. And if static linking the UPS software is a problem, you might consider having it use /-based copies of their required libraries using the LD_LIBRARY_PATH env.var. or maybe (?) using (at start of /etc/rc) "/sbin/ldconfig /etc/ld-ups.so.conf". To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message