]> Frank Brehm's Git Trees - config/bruni/etc.git/commitdiff
committing changes in /etc after emerge run
authorfrank <frank@bruni.home.brehm-online.com>
Mon, 16 Jan 2012 18:37:06 +0000 (19:37 +0100)
committerFrank Brehm <root@bruni.home.brehm-online.com>
Mon, 16 Jan 2012 18:37:06 +0000 (19:37 +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 898916f4946858ebda629bb5608ff43f769ce04f..29289ad77a0768dbbef5798fcb925be50fafd4d0 100755 (executable)
@@ -71,6 +71,10 @@ maybe chmod 0755 './X11/xinit/xinitrc.d/10-xdg-menu-gnome'
 maybe chmod 0755 './X11/xinit/xinitrc.d/70-seahorse-agent'
 maybe chmod 0755 './X11/xinit/xinitrc.d/80-dbus'
 maybe chmod 0755 './X11/xinit/xinitrc.d/90-consolekit'
+maybe chmod 0755 './acpi'
+maybe chmod 0755 './acpi/default.sh'
+maybe chmod 0755 './acpi/events'
+maybe chmod 0644 './acpi/events/default'
 maybe chmod 0600 './aiccu.conf'
 maybe chmod 0755 './apache2'
 maybe chmod 0644 './apache2/httpd.conf'
@@ -143,6 +147,7 @@ maybe chmod 0644 './chktexrc'
 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/apache2'
 maybe chmod 0644 './conf.d/auditd'
 maybe chmod 0644 './conf.d/bluetooth'
@@ -567,6 +572,7 @@ maybe chmod 0644 './host.conf'
 maybe chmod 0644 './hosts'
 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/apache2'
 maybe chmod 0755 './init.d/auditd'
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 $?
+}