Date: Thu, 25 May 2006 01:15:09 -0400 From: Garance A Drosihn <drosih@rpi.edu> To: Scott "Tuc" Ellentuch at T-B-O-H <ml@t-b-o-h.net>, freebsd-questions@freebsd.org Subject: Re: Anyone using sysutils/nut ? Message-ID: <p06230900c09aeb5443a2@[128.113.24.47]> In-Reply-To: <200605221454.k4MEsUdn088316@himinbjorg.tucs-beachin-obx-house.com> References: <200605221454.k4MEsUdn088316@himinbjorg.tucs-beachin-obx-house.com>
next in thread | previous in thread | raw e-mail | index | archive | help
At 10:54 AM -0400 5/22/06, 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. I seem to recall someone saying that the best way to do this was to create some flag-file, and then reboot instead of shutdown. Then very early in the system-startup you look for that flag-file, and run 'upsdrvctl shutdown'. Since you just successfully went through the complete shutdown, all the disks should be in a safe state. So, the UPS will yank the power out from under the computer, but it won't matter. The trick, of course, is to add some logic there so you can boot up after the power has returned! Either check the last-change date of the flag-file, or maybe do something to re-mount '/' as writable, delete the one file, and re-mount it back as read-only. I have never done any of this with my own UPS, so I'm not sure of the details... :-) -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p06230900c09aeb5443a2>