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

Re: wakeup mess up function keys on powerbook



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?

Cheers.

-- 
^Stefano Zacchiroli -- Master in Computer Science @ Uni. Bologna, Italy$
^zack@{cs.unibo.it,debian.org,bononia.it} -- http://www.bononia.it/zack$
^Frequentando il mio maestro mi ero reso conto [.] che la logica poteva$
^servire a molto a condizione di entrarci dentro e poi di uscirne -Adso$
#!/bin/sh
# try to mimic apmd behaviour
# by --Zack
case "$1" in
   sleep)
      run-parts --arg="suspend" --arg="power" /etc/apm/event.d
      ;;
   wakeup)
      run-parts --arg="resume" --arg="suspend" /etc/apm/event.d
      ;;
   *)
      ;;
esac
case "$2" in
   ac)
      run-parts --arg="change" --arg="power" /etc/apm/event.d
      /etc/init.d/laptop-mode.sh stop
      ;;
   battery)
      /etc/init.d/laptop-mode.sh start
      ;;
esac
exit 0

Reply to: