Re: wakeup mess up function keys on powerbook
On Tue, 2003-11-25 at 09:18, Stefano Zacchiroli wrote:
>
> BTW I also want to mimic apm.d behaviour for scripts located in
> /etc/apm/*.d. I'm using the attached /etc/power/pwrctl-local, but I'm
> not sure if the semantic I implemented is correct or not wrt to the
> mapping of events between pmud and apm.
Neither am I, but here's what I'm using, FWIW:
function pwrctl_Core99()
{
case "$1" in
[...]
sleep)
[...]
# Invoke APM scripts
if [ -d /etc/apm/event.d ]; then
run-parts --arg="suspend" --arg="resume" /etc/apm/event.d
fi
if [ -d /etc/apm/suspend.d ]; then
run-parts --arg="suspend" --arg="resume" /etc/apm/suspend.d
fi
[...]
;;
wakeup)
[...]
# Invoke APM scripts
if [ -d /etc/apm/resume.d ]; then
run-parts --arg="resume" --arg="suspend" /etc/apm/resume.d
fi
if [ -d /etc/apm/event.d ]; then
run-parts --arg="resume" --arg="suspend" /etc/apm/event.d
fi
;;
[...]
esac
case "$2" in
ac)
[...]
# Invoke APM scripts
if [ -d /etc/apm/other.d ]; then
run-parts --arg="change" --arg="power" /etc/apm/other.d
fi
if [ -d /etc/apm/event.d ]; then
run-parts --arg="change" --arg="power" /etc/apm/event.d
fi
;;
*)
[...]
# Invoke APM scripts
if [ -d /etc/apm/other.d ]; then
run-parts --arg="change" --arg="save" /etc/apm/other.d
fi
if [ -d /etc/apm/event.d ]; then
run-parts --arg="change" --arg="save" /etc/apm/event.d
fi
;;
esac
}
--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Software libre enthusiast | http://svcs.affero.net/rm.php?r=daenzer
Reply to: