Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Sep 2002 23:02:31 +0300
From:      Petri Riihikallio <Petri.Riihikallio@Metis.fi>
To:        swear@attbi.com (Gary W. Swearingen), questions@FreeBSD.ORG
Subject:   Re: How to shut down cleanly by killing power
Message-ID:  <a05111b0cb9ba676d874b@[192.168.0.2]>
In-Reply-To: <4rvg4r5jdl.g4r@localhost.localdomain>
References:  <bulk.28113.20020926143904@hub.freebsd.org> <a05111b07b9b9ec1c1aac@[192.168.0.2]> <87elbf1r7d.fsf@pooh.int> <a05111b04b9ba22404693@[192.168.0.2]> <qzd6qz73f4.6qz@localhost.localdomain> <a05111b09b9ba4b46ea3d@[192.168.0.2]> <4rvg4r5jdl.g4r@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
>  > 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.

Smarter UPSes can be programmed to recharge to some minimum level 
before supplying power, or at least wait some predefined time.

For dumb UPSes I saw somewhere a suggestion to add a snippet like 
this to rc.early:

if [ -f /etc/powerfail ] then
	sleep 120
	rm -f /etc/powerfail
fi

>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".

This shouldn't cause problems.
-- 
Cheers,
Petri

Metis / Petri Riihikallio
GSM: +358 400 505 939

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a05111b0cb9ba676d874b>