diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2010-05-03 19:44:43 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2010-05-03 19:44:43 +0000 |
commit | 7f239dee7255d7211ad5e2774f126088c33e1232 (patch) | |
tree | 63e4fde623a652684c846203db72bd3f4b12de9c /sys-power/acpid/files | |
parent | Fix Xinerama automagic, bug 312513, thanks for Andreas K. Huettel (dilfridge) (diff) | |
download | gentoo-2-7f239dee7255d7211ad5e2774f126088c33e1232.tar.gz gentoo-2-7f239dee7255d7211ad5e2774f126088c33e1232.tar.bz2 gentoo-2-7f239dee7255d7211ad5e2774f126088c33e1232.zip |
Revert back to 2.0.3-r1 state (no powerbtn.sh) for now...
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-power/acpid/files')
-rwxr-xr-x | sys-power/acpid/files/acpid-2.0.4-default.sh | 59 | ||||
-rw-r--r-- | sys-power/acpid/files/acpid-2.0.4-powerbtn.sh | 30 |
2 files changed, 0 insertions, 89 deletions
diff --git a/sys-power/acpid/files/acpid-2.0.4-default.sh b/sys-power/acpid/files/acpid-2.0.4-default.sh deleted file mode 100755 index 7f8f6c963e25..000000000000 --- a/sys-power/acpid/files/acpid-2.0.4-default.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/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 diff --git a/sys-power/acpid/files/acpid-2.0.4-powerbtn.sh b/sys-power/acpid/files/acpid-2.0.4-powerbtn.sh deleted file mode 100644 index 5d248db73cb3..000000000000 --- a/sys-power/acpid/files/acpid-2.0.4-powerbtn.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -PATH=/sbin:/bin:/usr/bin - -# Get the ID of the first active X11 session: -uid_session=$( -ck-list-sessions | \ -awk ' -/^Session[0-9]+:$/ { uid = active = x11 = "" ; next } -{ gsub(/'\''/, "", $3) } -$1 == "unix-user" { uid = $3 } -$1 == "active" { active = $3 } -$1 == "x11-display" { x11 = $3 } -active == "TRUE" && x11 != "" { - print uid - exit -}') - -# Check that there is a power manager, otherwise shut down. -[ "$uid_session" ] && -ps axo uid,cmd | \ -awk ' - $1 == '$uid_session' && - ($2 ~ /gnome-power-manager/ || $2 ~ /kded4/ || - $3 ~ /kded4/ || $3 ~ /guidance-power-manager/) \ - { found = 1; exit } - END { exit !found } -' || - shutdown -h now - |