I would to have a possibility to make a proper shutdown just by pressing
power button. So I've enabled apmd, and created a script /etc/apm/powerdown
with the contents:
#!/bin/sh
/sbin/halt -p
Unfortunately, the script doesn't seem to be called by apmd. When I press
the power button, I'm getting the error message:
apm0: APM set power state: unable to enter requested state (96)
Of course, instead of proper shutdown, power outage follows - resulting in
"filesystem was not properly unmounted" messages by next boot.
Not sure, how to fix it. Actually, I didn't want from APM to enter any power
state - just to execute /etc/apm/powerdown and nothing more.
APM is enabled in BIOS - it's old BX-based motherboard (Abit BE6-II), so
rather no problem with something unsupported - and apmd's introducing
himself during startup:
Apr 18 04:58:49 sarge /bsd: apm0 at bios0: Power Management spec V1.2
Apr 18 04:58:49 sarge /bsd: apm0: AC on, battery charge unknown
Apr 18 04:58:49 sarge /bsd: apm0: flags 70102 dobusy 1 doidle 1
>From that error message ("unable to enter requested state") I understand,
that "button-press event" is recognized by apmd. Perhaps there's a way to
change its action - I mean: instead of trying to "enter requested state"
(whatever it is), just to execute /etc/apm/powerdown ?
OpenBSD 4.2 i386
--
pozdrawiam / regards
Zbigniew Baniewski