]> Frank Brehm's Git Trees - config/samara/etc.git/commitdiff
committing changes in /etc after emerge run
authorfbrehm <fbrehm@samara.profitbricks.localdomain>
Mon, 20 Feb 2012 06:26:44 +0000 (07:26 +0100)
committerroot <root@samara.profitbricks.localdomain>
Mon, 20 Feb 2012 06:26:44 +0000 (07:26 +0100)
Package changes:
+sys-power/acpid-2.0.12

.etckeeper
acpi/default.sh [new file with mode: 0755]
acpi/events/default [new file with mode: 0644]
conf.d/acpid [new file with mode: 0644]
init.d/acpid [new file with mode: 0755]

index fdce29fd2177884f688ad2a9b79fd67efc49e032..09edd69fc7802e53a40373087243b067551c1ef2 100755 (executable)
@@ -115,6 +115,10 @@ maybe chmod 0755 './X11/xorg.conf.d'
 maybe chown fbrehm './X11/xorg.conf.d/20-evdev.conf'
 maybe chgrp users './X11/xorg.conf.d/20-evdev.conf'
 maybe chmod 0644 './X11/xorg.conf.d/20-evdev.conf'
+maybe chmod 0755 './acpi'
+maybe chmod 0755 './acpi/default.sh'
+maybe chmod 0755 './acpi/events'
+maybe chmod 0644 './acpi/events/default'
 maybe chmod 0755 './adobe'
 maybe chmod 0644 './adobe/mms.cfg'
 maybe chmod 0600 './aiccu.conf'
@@ -166,6 +170,7 @@ maybe chmod 0644 './chromium/default'
 maybe chmod 0644 './colordiffrc'
 maybe chmod 0644 './colordiffrc-lightbg'
 maybe chmod 0755 './conf.d'
+maybe chmod 0644 './conf.d/acpid'
 maybe chmod 0644 './conf.d/alsasound'
 maybe chmod 0644 './conf.d/auditd'
 maybe chmod 0644 './conf.d/bootmisc'
@@ -717,6 +722,7 @@ maybe chmod 0644 './idnalias.conf'
 maybe chmod 0644 './idnalias.conf.sample'
 maybe chmod 0755 './init.d'
 maybe chmod 0755 './init.d/NetworkManager'
+maybe chmod 0755 './init.d/acpid'
 maybe chmod 0755 './init.d/aiccu'
 maybe chmod 0755 './init.d/alsasound'
 maybe chmod 0755 './init.d/atd'
diff --git a/acpi/default.sh b/acpi/default.sh
new file mode 100755 (executable)
index 0000000..9fe26a1
--- /dev/null
@@ -0,0 +1,59 @@
+#!/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)
+                               /sbin/init 0
+                               ;;
+
+                       # 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/acpi/events/default b/acpi/events/default
new file mode 100644 (file)
index 0000000..a07c182
--- /dev/null
@@ -0,0 +1,19 @@
+# /etc/acpi/events/default
+# This is the ACPID default configuration, it takes all
+# events and passes them to /etc/acpi/default.sh for further
+# processing.
+
+# event keeps a regular expression matching the event. To get
+# power events only, just use something like "event=button[ /]power.*"
+# to catch it.
+# action keeps the command to be executed after an event occurs
+# In case of the power event above, your entry may look this way:
+#event=button[ /]power.*
+#action=/sbin/init 0
+
+# Optionally you can specify the placeholder %e. It will pass
+# through the whole kernel event message to the program you've
+# specified.
+
+event=.*
+action=/etc/acpi/default.sh %e
diff --git a/conf.d/acpid b/conf.d/acpid
new file mode 100644 (file)
index 0000000..3032976
--- /dev/null
@@ -0,0 +1,6 @@
+# /etc/conf.d/acpid: config file for /etc/init.d/acpid
+
+# Options to pass to the acpid daemon.
+# See the acpid(8) man page for more info.
+
+ACPID_OPTIONS=""
diff --git a/init.d/acpid b/init.d/acpid
new file mode 100755 (executable)
index 0000000..946e39b
--- /dev/null
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/files/acpid-2.0.11-init.d,v 1.7 2011/12/04 10:33:21 swegener Exp $
+
+extra_started_commands="reload"
+command="/usr/sbin/acpid"
+command_args="${ACPID_OPTIONS}"
+start_stop_daemon_args="--quiet"
+description="Daemon for Advanced Configuration and Power Interface"
+
+depend() {
+       need localmount
+       use logger
+}
+
+if [ "${RC_VERSION:-0}" = "0" ]; then
+       start() {
+               eerror "This script cannot be used for baselayout-1."
+               return 1
+       }
+fi
+
+reload() {
+       ebegin "Reloading acpid configuration"
+       start-stop-daemon --exec $command --signal HUP
+       eend $?
+}