tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: screenblank envsys pseudo device
On Sat, May 23, 2009 at 9:45 PM, matthew sporleder
<msporleder%gmail.com@localhost> wrote:
> Hi, I wrote a pseudo device that presents an ioctl which triggers an
> envsys event that will eventually make it to powerd. My original plan
> for this was to add the ioctl to screenblank so I could have powerd
> run vbetool when it blanked the screen.
>
> I have it basically functioning but before I got too crazy trying to
> clean it up I was wondering if anyone else was interesting in this
> sort of thing and if anyone can guide me on a less round-about way of
> accomplishing this.
>
Okay, I can now flip an ioctl and have powerd execute vbetool but I
ended up hacking my script into /etc/powerd/scripts/sensor_indicator
by having sensor_indicator look for a script named after the device
and re-passing the event.
ex:
critical-under)
logger -p warning "${0}: ($1) $2 dropped below critical limit
[${3}]" >&1
if [ -x /etc/powerd/scripts/${1} ]
then
logger -p warning "executing ./${1} ${2} ${3}"
/etc/powerd/scripts/${1} ${2} ${3}
fi
exit 0
;;
How do I get my device recognized as a top-tier sensor_ script?
Thanks,
Matt
Home |
Main Index |
Thread Index |
Old Index