[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wakeup mess up function keys on powerbook



On Tue, 2003-11-25 at 09:18, Stefano Zacchiroli wrote:
> On Tue, Nov 25, 2003 at 08:46:54AM +0100, Soeren Sonnenburg wrote:
> > > What about /etc/power/pwrctl? pbbuttonsd can execute some scripts, but
> > > it seems to me that it's less flexible than pmud in this ...
> > add Script_ProfChanged      = "/etc/power/pwrctl-wrapper %s %s"
> > and put the attached script to /etc/power/pwrctl-wrapper
> > 
> > the medium power level is not working anyway so yes it is a full
> > substitute.
> 
> Ok, many thanks.
> 
> 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. Anyone has already solved a
> similar problem?

I have something similiar standing there... it also works for me(tm) but
I am also open for suggestions.

case "$1" in
[...]
sleep)
        $logger -p daemon.info -t pwrctl-local "sleep $2"
        run-parts --arg=suspend --arg=power /etc/apm/event.d
;;
wakeup)
        $logger -p daemon.info -t pwrctl-local "wakeup $2"
        run-parts --arg=resume --arg=suspend /etc/apm/event.d
;;
*)
        $logger -p daemon.error -t pwrctl-local "invalid arg $1 $2"
        exit 2
;;
esac

Soeren



Reply to: