[Nut-upsuser] Powerdown on FreeBSD
Daniel O'Connor
doconnor at gsoft.com.au
Thu Aug 17 13:15:19 UTC 2006
On Thursday 17 August 2006 21:52, Johan Pramming wrote:
> I have added the following to /etc/rc.shutdown:
> if (test -f /etc/killpower)
Isn't this csh scripting..? (and rc.shutdown is sh)
Anyway..
I modified /usr/local/etc/rc.d/nut.sh to check for /etc/killpower by modifying
the poststop function.. eg
nut_poststop() {
${nut_prefix}/libexec/nut/upsdrvctl stop
if [ -r /etc/killpower ]; then
rm -f /etc/killpower
${nut_prefix}/libexec/nut/upsdrvctl -v shutdown
fi
}
I have ondelay = 13 and offdelay = 120 in my ups.conf (MGE Pulsar EX) so the
system gets 2 minutes to shut down gracefully.
> I dropped the sleep command, as it doesn't have the desired effect on
> FreeBSD.
FreeBSD doesn't remount file systems read-only so it has a detrimental
effect :)
> Is it at all possible with the PowerMust driver?
I've never used PowerMust, hopefully someone else can answer your query.
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20060817/29b2e7a3/attachment.pgp
More information about the Nut-upsuser
mailing list