Acpid: Difference between revisions
No edit summary |
Devilsclaw (talk | contribs) No edit summary |
||
| (13 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{| style="text-align: left; background-color: AliceBlue;" | {| style="text-align: left; background-color: AliceBlue;" | ||
|- | |-valign="top" | ||
!Download Source: | !Download Source: | ||
| http://prdownloads.sourceforge.net/acpid/acpid- | | http://prdownloads.sourceforge.net/acpid/acpid-{{Acpid-Version}}.tar.gz | ||
|} | |} | ||
---- | ---- | ||
{{Package-Introduction|The Advanced Configuration & Power Interface Daemon (ACPID) is a flexible and totally extensible daemon for responding to ACPI events. It listens to /proc/acpi/event and executes programs to handle the events when they occur. The programs it executes are configured through a set of configuration files.|https://sourceforge.net/projects/acpid/}} | |||
== Dependencies == | == Dependencies == | ||
=== Optional === | |||
* [[Hdparm]] | |||
{{Note|Acpid does not use ''DESTDIR'', Acpid uses ''INSTPREFIX'' instead. Use ''INSTPREFIX'' as you would normally use ''DESTDIR''.}} | |||
== Non-Multilib == | == Non-Multilib == | ||
| Line 55: | Line 62: | ||
make install | make install | ||
== Configuring == | |||
=== Configuring Events === | |||
The following sample event included with Acpid will set the hard drive to spindown after 5 minutes when the computer is on battery power but keep it on 100% of the time while the computer is plugged in: | |||
mkdir -pv /etc/acpi/events && | |||
cp -v samples/battery/battery.conf /etc/acpi/events && | |||
cp -v samples/battery/battery.sh /etc/acpi && | |||
chmod 755 /etc/acpi/battery.sh | |||
The above sample depends on [[Hdparm]] to function properly. | |||
=== Bootscript === | |||
Create the bootscript: | |||
cat > /etc/rc.d/init.d/acpid << "EOF" | |||
#!/bin/sh | |||
# Begin $rc_base/init.d/acpid | |||
. /etc/sysconfig/rc | |||
. ${rc_functions} | |||
case "${1}" in | |||
start) | |||
boot_mesg "Starting acpid..." | |||
loadproc /usr/sbin/acpid | |||
;; | |||
stop) | |||
boot_mesg "Stopping acpid..." | |||
killproc /usr/sbin/acpid | |||
;; | |||
restart) | |||
${0} stop | |||
sleep 1 | |||
${0} start | |||
;; | |||
status) | |||
statusproc /usr/sbin/acpid | |||
;; | |||
*) | |||
echo "Usage: ${0} {start|stop|restart|status}" | |||
exit 1 | |||
;; | |||
esac | |||
# End $rc_base/init.d/acpid | |||
EOF | |||
chmod -v 754 /etc/rc.d/init.d/acpid | |||
Link it into the runlevels: | |||
for link in /etc/rc.d/rc{{0,1,6}.d/K32,{2,3,4,5}.d/S18}acpid; do | |||
ln -sfv ../init.d/acpid $link; | |||
done | |||
= Contents = | |||
{| style="text-align: left;" | |||
|-valign="top" | |||
! Installed Programs: | |||
| acpid acpi_listen | |||
|-valign="top" | |||
! Installed Libraries: | |||
| None | |||
|-valign="top" | |||
! Installed Directories: | |||
| None | |||
|} | |||
[[Category:Power Management]] | |||
Latest revision as of 14:36, 30 August 2009
| Download Source: | http://prdownloads.sourceforge.net/acpid/acpid-1.0.10.tar.gz |
|---|
Introduction to Acpid
The Advanced Configuration & Power Interface Daemon (ACPID) is a flexible and totally extensible daemon for responding to ACPI events. It listens to /proc/acpi/event and executes programs to handle the events when they occur. The programs it executes are configured through a set of configuration files.
Project Homepage: https://sourceforge.net/projects/acpid/
Dependencies
Optional
Non-Multilib
Compile the package:
sed -i "s/-Werror//g" Makefile && make
Install the package
make install
Multilib
This package does not provide any libraries so only one installation is needed.
32Bit
Compile the package:
sed -i "s/-Werror//g" Makefile &&
make CC="gcc ${BUILD32}"
Install the package
make install
N32
Compile the package:
sed -i "s/-Werror//g" Makefile &&
make CC="gcc ${BUILDN32}"
Install the package
make install
64Bit
Compile the package:
sed -i "s/-Werror//g" Makefile &&
make CC="gcc ${BUILD64}"
Install the package
make install
Configuring
Configuring Events
The following sample event included with Acpid will set the hard drive to spindown after 5 minutes when the computer is on battery power but keep it on 100% of the time while the computer is plugged in:
mkdir -pv /etc/acpi/events && cp -v samples/battery/battery.conf /etc/acpi/events && cp -v samples/battery/battery.sh /etc/acpi && chmod 755 /etc/acpi/battery.sh
The above sample depends on Hdparm to function properly.
Bootscript
Create the bootscript:
cat > /etc/rc.d/init.d/acpid << "EOF"
#!/bin/sh
# Begin $rc_base/init.d/acpid
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Starting acpid..."
loadproc /usr/sbin/acpid
;;
stop)
boot_mesg "Stopping acpid..."
killproc /usr/sbin/acpid
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /usr/sbin/acpid
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/acpid
EOF
chmod -v 754 /etc/rc.d/init.d/acpid
Link it into the runlevels:
for link in /etc/rc.d/rc{{0,1,6}.d/K32,{2,3,4,5}.d/S18}acpid; do
ln -sfv ../init.d/acpid $link;
done
Contents
| Installed Programs: | acpid acpi_listen |
|---|---|
| Installed Libraries: | None |
| Installed Directories: | None |