Author: igor Date: Wed Jul 10 15:04:20 2013 New Revision: 11379 Log: added acpid-2.0.19
Added: trunk/BOOK/general/sysutils/acpid.xml (contents, props changed) trunk/bootscripts/blfs/init.d/acpid (contents, props changed) Modified: trunk/BOOK/general.ent trunk/BOOK/general/sysutils/sysutils.xml trunk/BOOK/introduction/welcome/changelog.xml trunk/bootscripts/ChangeLog trunk/bootscripts/Makefile Modified: trunk/BOOK/general.ent ============================================================================== --- trunk/BOOK/general.ent Wed Jul 10 06:20:06 2013 (r11378) +++ trunk/BOOK/general.ent Wed Jul 10 15:04:20 2013 (r11379) @@ -68,7 +68,7 @@ <!ENTITY lfs-vim-version "7.3"> <!-- End LFS versions --> -<!ENTITY blfs-bootscripts-version "20130611"> +<!ENTITY blfs-bootscripts-version "20130710"> <!ENTITY blfs-bootscripts-download "&downloads-root;/blfs-bootscripts-&blfs-bootscripts-version;.tar.bz2"> <!ENTITY blfs-wiki "http://wiki.&lfs-domainname;/blfs/wiki"> @@ -327,6 +327,7 @@ <!ENTITY xscreensaver-version "5.21"> <!-- Chapter 12 --> +<!ENTITY acpid-version "2.0.19"> <!ENTITY apache-ant-version "1.8.4"> <!ENTITY at-version "3.1.13"> <!ENTITY autofs-version "5.0.7"> @@ -347,7 +348,7 @@ <!ENTITY obex-data-server-version "0.4.6"> <!ENTITY obexd-version "0.48"> <!ENTITY pciutils-version "3.2.0"> -<!ENTITY pm-utils-version "1.4.1"> +<!ENTITY pm-utils-version "1.4.1"> <!ENTITY raptor-version "2.0.9"> <!ENTITY rasqal-version "0.9.30"> <!ENTITY redland-version "1.0.16"> Added: trunk/BOOK/general/sysutils/acpid.xml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/BOOK/general/sysutils/acpid.xml Wed Jul 10 15:04:20 2013 (r11379) @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../../general.ent"> + %general-entities; + + <!ENTITY acpid-download-http "&sourceforge-repo;/acpid2/acpid-&acpid-version;.tar.xz"> + <!ENTITY acpid-download-ftp " "> + <!ENTITY acpid-md5sum "0b07a982e3e28cf37645f2c6269af72e"> + <!ENTITY acpid-size "148 KB"> + <!ENTITY acpid-buildsize "2.3 MB"> + <!ENTITY acpid-time "0.1 SBU"> +]> + +<sect1 id="acpid" xreflabel="acpid-&acpid-version;"> + <?dbhtml filename="acpid.html"?> + + <sect1info> + <othername>$LastChangedBy$</othername> + <date>$Date$</date> + </sect1info> + + <title>acpid-&acpid-version;</title> + + <indexterm zone="acpid"> + <primary sortas="a-acpid">acpid</primary> + </indexterm> + + <sect2 role="package"> + <title>Introduction to acpid</title> + + <para> + The <application>acpid</application> (Advanced Configuration and Power + Interface event daemon) is a completely flexible, totally extensible + daemon for delivering ACPI events. It listens on netlink interface and + when an event occurs, executes programs to handle the event. The programs + it executes are configured through a set of configuration files, which can + be dropped into place by packages or by the user. + </para> + + &lfs73_checked; + + <bridgehead renderas="sect3">Package Information</bridgehead> + <itemizedlist spacing="compact"> + <listitem> + <para> + Download (HTTP): <ulink url="&acpid-download-http;"/> + </para> + </listitem> + <listitem> + <para> + Download (FTP): <ulink url="&acpid-download-ftp;"/> + </para> + </listitem> + <listitem> + <para> + Download MD5 sum: &acpid-md5sum; + </para> + </listitem> + <listitem> + <para> + Download size: &acpid-size; + </para> + </listitem> + <listitem> + <para> + Estimated disk space required: &acpid-buildsize; + </para> + </listitem> + <listitem> + <para> + Estimated build time: &acpid-time; + </para> + </listitem> + </itemizedlist> + + <para condition="html" role="usernotes">User Notes: + <ulink url="&blfs-wiki;/acpid"/> + </para> + </sect2> + + <sect2 role="installation"> + <title>Installation of acpid</title> + + <para> + Install <application>acpid</application> by + running the following commands: + </para> + +<screen><userinput>./configure --prefix=/usr --docdir=/usr/share/doc/acpid-&acpid-version; && +make</userinput></screen> + + <para> + This package does not come with a test suite. + </para> + + <para> + Now, as the <systemitem class="username">root</systemitem> user: + </para> + +<screen role="root"><userinput>make install && +install -v -m755 -d /etc/acpi/events && +cp -r samples /usr/share/doc/acpid-&acpid-version;</userinput></screen> + + </sect2> + + <sect2 role="configuration"> + <title>Configuring acpid</title> + + <para> + <application>acpid</application> is configured by user defined events. + Place event files under + <filename class="directory">/etc/acpi/events</filename> directory. If an + event occurs, <command>acpid</command> recurses through the event files in + order to see if the regex defined after "event" matches. If they do, + action is executed. + </para> + + <para> + The following brief example will suspend the system when the laptop lid + is closed (it requires <xref linkend="pm-utils"/>): + </para> + +<screen role="root"><userinput>cat > /etc/acpi/events/lid << "EOF" +<literal>event=button/lid +action=/etc/acpi/lid.sh</literal> +EOF + +cat > /etc/acpi/lid.sh << "EOF" +<literal>#!/bin/sh +/bin/grep -q open /proc/acpi/button/lid/LID/state && exit 0 +/usr/sbin/pm-suspend</literal> +EOF +chmod +x /etc/acpi/lid.sh</userinput></screen> + + <para> + Unfortunately, not every computer labels ACPI events in the same way. To + determine how your buttons are recognized, use the + <command>acpi_listen</command> tool. Also, look in package documentation's + samples directory for more examples. + </para> + + <sect3 id="acpid-init"> + <title>Boot Script</title> + + <para> + To automatically start <command>acpid</command> when the system is + rebooted, install the <filename>/etc/rc.d/init.d/acpid</filename> + boot script from the <xref linkend="bootscripts"/> package. + </para> + + <indexterm zone="acpid acpid-init"> + <primary sortas="f-acpid">acpid</primary> + </indexterm> + +<screen role="root"><userinput>make install-acpid</userinput></screen> + + </sect3> + + </sect2> + + <sect2 role="content"> + <title>Contents</title> + + <segmentedlist> + <segtitle>Installed Programs</segtitle> + <segtitle>Installed Libraries</segtitle> + <segtitle>Installed Directory</segtitle> + + <seglistitem> + <seg> + acpid, acpi_listen and kacpimon + </seg> + <seg> + None + </seg> + <seg> + /usr/share/doc/acpid-&acpid-version; + </seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="acpid-prog"> + <term><command>acpid</command></term> + <listitem> + <para> + is a program that listens for ACPI events and executes the rules + that match the received event. + </para> + <indexterm zone="acpid acpid-prog"> + <primary sortas="b-acpid">acpid</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="acpi_listen"> + <term><command>acpi_listen</command></term> + <listitem> + <para> + is a simple tool which connects to <command>acpid</command> and + listens for events. + </para> + <indexterm zone="acpid acpi_listen"> + <primary sortas="b-acpi_listen">acpi_listen</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="kacpimon"> + <term><command>kacpimon</command></term> + <listitem> + <para> + is a monitor program that connects to three sources of ACPI events + (events file, netlink and input layer) and then reports on what it + sees while it is connected. + </para> + <indexterm zone="acpid kacpimon"> + <primary sortas="b-kacpimon">kacpimon</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> Modified: trunk/BOOK/general/sysutils/sysutils.xml ============================================================================== --- trunk/BOOK/general/sysutils/sysutils.xml Wed Jul 10 06:20:06 2013 (r11378) +++ trunk/BOOK/general/sysutils/sysutils.xml Wed Jul 10 15:04:20 2013 (r11379) @@ -19,6 +19,7 @@ some applications used by other applications in the book for installation or configuration purposes.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acpid.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apache-ant.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="at.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autofs.xml"/> Modified: trunk/BOOK/introduction/welcome/changelog.xml ============================================================================== --- trunk/BOOK/introduction/welcome/changelog.xml Wed Jul 10 06:20:06 2013 (r11378) +++ trunk/BOOK/introduction/welcome/changelog.xml Wed Jul 10 15:04:20 2013 (r11379) @@ -47,6 +47,9 @@ <para>July 10th, 2013</para> <itemizedlist> <listitem> + <para>[igor] - Added acpid-2.0.19.</para> + </listitem> + <listitem> <para>[igor] - Added pm-utils-1.4.1.</para> </listitem> </itemizedlist> Modified: trunk/bootscripts/ChangeLog ============================================================================== --- trunk/bootscripts/ChangeLog Wed Jul 10 06:20:06 2013 (r11378) +++ trunk/bootscripts/ChangeLog Wed Jul 10 15:04:20 2013 (r11379) @@ -1,3 +1,6 @@ +2013-07-10 Igor Živković <[email protected]> + * Added acpid bootscript + 2013-02-04 Armin K. <[email protected]> * Added network service for wpa_supplicant * Minor modifications to dhclient network service Modified: trunk/bootscripts/Makefile ============================================================================== --- trunk/bootscripts/Makefile Wed Jul 10 06:20:06 2013 (r11378) +++ trunk/bootscripts/Makefile Wed Jul 10 15:04:20 2013 (r11379) @@ -40,6 +40,16 @@ install-service-wpa: create-service-dir install -m ${MODE} blfs/services/wpa ${LIBDIR} +install-acpid: create-dirs + install -m ${MODE} blfs/init.d/acpid ${EXTDIR}/rc.d/init.d/ + ln -sf ../init.d/acpid ${EXTDIR}/rc.d/rc0.d/K32acpid + ln -sf ../init.d/acpid ${EXTDIR}/rc.d/rc1.d/K32acpid + ln -sf ../init.d/acpid ${EXTDIR}/rc.d/rc2.d/S18acpid + ln -sf ../init.d/acpid ${EXTDIR}/rc.d/rc3.d/S18acpid + ln -sf ../init.d/acpid ${EXTDIR}/rc.d/rc4.d/S18acpid + ln -sf ../init.d/acpid ${EXTDIR}/rc.d/rc5.d/S18acpid + ln -sf ../init.d/acpid ${EXTDIR}/rc.d/rc6.d/K32acpid + install-alsa: create-dirs install -m ${MODE} blfs/init.d/alsa ${EXTDIR}/rc.d/init.d/ ln -sf ../init.d/alsa ${EXTDIR}/rc.d/rc0.d/K35alsa @@ -502,6 +512,16 @@ rm -f ${EXTDIR}/rc.d/rc5.d/S68atd rm -f ${EXTDIR}/rc.d/rc6.d/K29atd +uninstall-acpid: + rm -f ${EXTDIR}/rc.d/init.d/acpid + rm -f ${EXTDIR}/rc.d/rc0.d/K32acpid + rm -f ${EXTDIR}/rc.d/rc1.d/K32acpid + rm -f ${EXTDIR}/rc.d/rc2.d/S18acpid + rm -f ${EXTDIR}/rc.d/rc3.d/S18acpid + rm -f ${EXTDIR}/rc.d/rc4.d/S18acpid + rm -f ${EXTDIR}/rc.d/rc5.d/S18acpid + rm -f ${EXTDIR}/rc.d/rc6.d/K32acpid + uninstall-alsa: rm -f ${EXTDIR}/rc.d/init.d/alsa rm -f ${EXTDIR}/rc.d/rc0.d/K35alsa @@ -882,6 +902,7 @@ install-service-ipx \ install-service-pppoe \ install-atd \ + install-acpid \ install-alsa \ install-avahi \ install-httpd \ @@ -922,6 +943,7 @@ install-winbindd \ install-xinetd \ uninstall-atd \ + uninstall-acpid \ uninstall-alsa \ uninstall-avahi \ uninstall-httpd \ Added: trunk/bootscripts/blfs/init.d/acpid ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/bootscripts/blfs/init.d/acpid Wed Jul 10 15:04:20 2013 (r11379) @@ -0,0 +1,59 @@ +#!/bin/sh +######################################################################## +# Begin acpid +# +# Description : ACPI event daemon boot script +# +# Author : Igor Živković <[email protected]> +# +# Version : BLFS SVN +# +######################################################################## + +### BEGIN INIT INFO +# Provides: acpid +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Starts Advanced Configuration and Power Interface event daemon +# X-LFS-Provided-By: BLFS +### END INIT INFO + +. /lib/lsb/init-functions + +#$LastChangedBy$ +#$Date$ + +case "$1" in + start) + log_info_msg "Starting ACPI event daemon..." + start_daemon /usr/sbin/acpid + sleep 1 + pidofproc -p "/run/acpid.pid" > /dev/null + evaluate_retval + ;; + + stop) + log_info_msg "Stopping ACPI event daemon..." + killproc -p "/run/acpid.pid" /usr/sbin/acpid + evaluate_retval + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /usr/sbin/acpid + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +# End acpid -- http://linuxfromscratch.org/mailman/listinfo/blfs-book FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
