powerd: Linger a little bit if battery life is low
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 17 Jun 2015 12:39:34 +0000 (20:39 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 17 Jun 2015 12:47:49 +0000 (20:47 +0800)
commitb1b8502e33038d6d4fefcf5a2f01c6c2d118aa0e
tree59158ab0b5c7b88b30c5ea13cecb795f35f3fd7e
parente895e94d539d4e7184f4823177557af4e3a227dd
powerd: Linger a little bit if battery life is low

So that we could have time to plugin AC line.

And in addition to logging messages on console, alarming audio
alert, since most laptop users will use X; they will not notice
the console messages.  Audio alert is enabled by default and
could be disabled by -Q.

While I'm here, fix powerd.8 and allow disabling battery life
monitoring if 0 is passed to -P.

Suggested-by: seallyhs
usr.sbin/powerd/alert1.h [new file with mode: 0644]
usr.sbin/powerd/powerd.8
usr.sbin/powerd/powerd.c