public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] gentoo-x86 commit in sys-power/acpid/files: acpid-2.0.4-default.sh
@ 2010-04-26 12:55 99% Samuli Suominen (ssuominen)
  0 siblings, 0 replies; 1+ results
From: Samuli Suominen (ssuominen) @ 2010-04-26 12:55 UTC (permalink / raw
  To: gentoo-commits

ssuominen    10/04/26 12:55:42

  Added:                acpid-2.0.4-default.sh
  Log:
  Version bump wrt #317273 by Tim Harder. Install new powerbtn.sh wrt #253764 by Pacho Ramos.
  (Portage version: 2.2_rc67/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  sys-power/acpid/files/acpid-2.0.4-default.sh

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/acpid/files/acpid-2.0.4-default.sh?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/acpid/files/acpid-2.0.4-default.sh?rev=1.1&content-type=text/plain

Index: acpid-2.0.4-default.sh
===================================================================
#!/bin/sh
# /etc/acpi/default.sh
# Default acpi script that takes an entry for all actions

set $*

group=${1%%/*}
action=${1#*/}
device=$2
id=$3
value=$4

log_unhandled() {
	logger "ACPI event unhandled: $*"
}

case "$group" in
	button)
		case "$action" in
			power)
				/etc/acpi/powerbtn.sh
				;;

			# if your laptop doesnt turn on/off the display via hardware
			# switch and instead just generates an acpi event, you can force
			# X to turn off the display via dpms.  note you will have to run
			# 'xhost +local:0' so root can access the X DISPLAY.
			#lid)
			#	xset dpms force off
			#	;;

			*)	log_unhandled $* ;;
		esac
		;;

	ac_adapter)
		case "$value" in
			# Add code here to handle when the system is unplugged
			# (maybe change cpu scaling to powersave mode).  For
			# multicore systems, make sure you set powersave mode
			# for each core!
			#*0)
			#	cpufreq-set -g powersave
			#	;;

			# Add code here to handle when the system is plugged in
			# (maybe change cpu scaling to performance mode).  For
			# multicore systems, make sure you set performance mode
			# for each core!
			#*1)
			#	cpufreq-set -g performance
			#	;;

			*)	log_unhandled $* ;;
		esac
		;;

	*)	log_unhandled $* ;;
esac






^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2010-04-26 12:55 99% [gentoo-commits] gentoo-x86 commit in sys-power/acpid/files: acpid-2.0.4-default.sh Samuli Suominen (ssuominen)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox