--- acpid-1.0.6.orig/ud_socket.h +++ acpid-1.0.6/ud_socket.h @@ -11,5 +11,6 @@ int ud_create_socket(const char *name); int ud_accept(int sock, struct ucred *cred); int ud_connect(const char *name); +int ud_get_peercred(int fd, struct ucred *cred); #endif --- acpid-1.0.6.orig/event.c +++ acpid-1.0.6/event.c @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include #include #include @@ -35,6 +37,7 @@ #include #include "acpid.h" +#include "ud_socket.h" /* * What is a rule? It's polymorphic, pretty much. @@ -80,20 +83,6 @@ static char *parse_cmd(const char *cmd, const char *event); static int check_escapes(const char *str); -/* helper */ -static int -path_is_dir(const char *path) -{ - struct stat s; - - if (stat(path, &s)) { - acpid_log(LOG_ERR, "stat(\"%s\"): %s\n", - path, strerror(errno)); - return 0; - } - return S_ISDIR(s.st_mode); -} - /* * read in all the configuration files */ @@ -104,6 +93,8 @@ struct dirent *dirent; char *file = NULL; int nrules = 0; + char *basen = NULL; + regex_t preg; lock_rules(); @@ -119,6 +110,7 @@ while ((dirent = readdir(dir))) { int len; struct rule *r; + struct stat stat_buf; if (dirent->d_name[0] == '.') continue; /* skip dotfiles */ @@ -139,15 +131,31 @@ } snprintf(file, len, "%s/%s", confdir, dirent->d_name); - if (path_is_dir(file)) { + /* allow only regular files and symlinks to these */ + if (stat(file, &stat_buf) != 0) { + acpid_log(LOG_ERR, "stat(%s): %s\n", file, strerror(errno)); + unlock_rules(); + return -1; + } + if (!S_ISREG(stat_buf.st_mode)) { + acpid_log(LOG_DEBUG, "skipping non-file %s\n", file); free(file); continue; /* skip subdirs */ } - r = parse_file(file); - if (r) { - enlist_rule(&cmd_list, r); - nrules++; + /* check for run-parts style filename */ + basen = basename(file); + if (regcomp(&preg, "^[a-zA-Z0-9_-]+$", RULE_REGEX_FLAGS) == 0){ + if (regexec(&preg, basen, 0, NULL, 0) == 0){ + r = parse_file(file); + if (r) { + enlist_rule(&cmd_list, r); + nrules++; + } + } else { + acpid_log(LOG_DEBUG, "ignoring conf file %s\n", file); + } + } free(file); } @@ -235,7 +243,7 @@ } /* read each line */ - while (!feof(fp)) { + while (!feof(fp) && !ferror(fp)) { char *p = buf; char key[64]; char val[512]; @@ -453,6 +461,55 @@ free(r); } +static int +client_is_dead(int fd) +{ + struct pollfd pfd; + int r; + + /* check the fd to see if it is dead */ + pfd.fd = fd; + pfd.events = POLLERR | POLLHUP; + r = poll(&pfd, 1, 0); + + if (r < 0) { + acpid_log(LOG_ERR, "poll(): %s\n", strerror(errno)); + return 0; + } + + return pfd.revents; +} + +void +acpid_close_dead_clients(void) +{ + struct rule *p; + + lock_rules(); + + /* scan our client list */ + p = client_list.head; + while (p) { + struct rule *next = p->next; + if (client_is_dead(p->action.fd)) { + struct ucred cred; + /* closed */ + acpid_log(LOG_NOTICE, + "client %s has disconnected\n", p->origin); + delist_rule(&client_list, p); + ud_get_peercred(p->action.fd, &cred); + if (cred.uid != 0) { + non_root_clients--; + } + close(p->action.fd); + free_rule(p); + } + p = next; + } + + unlock_rules(); +} + /* * the main hook for propogating events */ @@ -610,9 +667,14 @@ r = safe_write(client, event, strlen(event)); if (r < 0 && errno == EPIPE) { + struct ucred cred; /* closed */ acpid_log(LOG_NOTICE, "client has disconnected\n"); delist_rule(&client_list, rule); + ud_get_peercred(rule->action.fd, &cred); + if (cred.uid != 0) { + non_root_clients--; + } close(rule->action.fd); free_rule(rule); return -1; --- acpid-1.0.6.orig/acpid.h +++ acpid-1.0.6/acpid.h @@ -34,7 +34,9 @@ #define ACPI_CONFDIR "/etc/acpi/events" #define ACPI_SOCKETFILE "/var/run/acpid.socket" #define ACPI_SOCKETMODE 0666 +#define ACPID_CLIENTMAX 256 #define ACPI_MAX_ERRS 5 +#define ACPI_LOCKFILE "/var/lock/acpid" #define PACKAGE "acpid" @@ -42,6 +44,7 @@ * acpid.c */ extern int acpid_debug; +extern int non_root_clients; extern int acpid_log(int level, const char *fmt, ...); /* @@ -51,5 +54,6 @@ extern int acpid_add_client(int client, const char *origin); extern int acpid_cleanup_rules(int do_detach); extern int acpid_handle_event(const char *event); +extern void acpid_close_dead_clients(void); #endif /* ACPID_H__ */ --- acpid-1.0.6.orig/acpi_listen.8 +++ acpid-1.0.6/acpi_listen.8 @@ -1,4 +1,4 @@ -.TH acpi_listen 17 "Nov 2003" +.TH acpi_listen 8 "Nov 2003" .\" Portions Copyright (c) 2003 Sun Microsystems .\" Copyright (c) 2004 Tim Hockin (thockin@hockin.org) .\" Some parts (C) 2003 - Gismo / Luca Capello http://luca.pca.it @@ -8,7 +8,7 @@ \fBacpi_listen\fP [\fIoptions\fP] .SH DESCRIPTION -\fBacpid\fP is the sysem-wide ACPI event catcher. \fBacpi_listen\fP is a +\fBacpid\fP is the system-wide ACPI event catcher. \fBacpi_listen\fP is a simple shell-friendly tool which connects to acpid and listens for events. When an event occurs, acpi_listen will print it on stdout. --- acpid-1.0.6.orig/acpid.c +++ acpid-1.0.6/acpid.c @@ -43,20 +43,26 @@ static int daemonize(void); static int open_log(void); static void clean_exit(int sig); +static void clean_exit_with_status(int status); static void reload_conf(int sig); static char *read_line(int fd); /* global debug level */ int acpid_debug; +/* the number of non-root clients that are connected */ +int non_root_clients; + static const char *progname; static const char *confdir = ACPI_CONFDIR; static const char *eventfile = ACPI_EVENTFILE; static const char *socketfile = ACPI_SOCKETFILE; +static const char *lockfile = ACPI_LOCKFILE; static int nosocket; static const char *socketgroup; static mode_t socketmode = ACPI_SOCKETMODE; static int foreground; +static int clientmax = ACPID_CLIENTMAX; int main(int argc, char **argv) @@ -190,9 +196,17 @@ continue; } + /* house keeping */ + acpid_close_dead_clients(); + /* was it an event? */ if (ar[0].revents) { char *event; + struct stat trash; + int fexists; + + /* Check for the existence of a lockfile */ + fexists = stat(lockfile, &trash); /* this shouldn't happen */ if (!ar[0].revents & POLLIN) { @@ -204,6 +218,15 @@ /* read and handle an event */ event = read_line(event_fd); + + /* we're locked, don't process the event */ + if (fexists == 0) { + acpid_log(LOG_INFO, + "Lock file present, not processing event\n"); + continue; + } + + if (event) { acpid_log(LOG_INFO, "received event \"%s\"\n", event); @@ -230,6 +253,7 @@ int cli_fd; struct ucred creds; char buf[32]; + static int accept_errors; /* this shouldn't happen */ if (!ar[1].revents & POLLIN) { @@ -244,15 +268,30 @@ if (cli_fd < 0) { acpid_log(LOG_ERR, "can't accept client: %s\n", strerror(errno)); + accept_errors++; + if (accept_errors >= 5) { + acpid_log(LOG_ERR, "giving up\n"); + clean_exit_with_status(EXIT_FAILURE); + } + continue; + } + accept_errors = 0; + if (creds.uid != 0 && non_root_clients >= clientmax) { + close(cli_fd); + acpid_log(LOG_ERR, + "too many non-root clients\n"); continue; } + if (creds.uid != 0) { + non_root_clients++; + } snprintf(buf, sizeof(buf)-1, "%d[%d:%d]", creds.pid, creds.uid, creds.gid); acpid_add_client(cli_fd, buf); } } - clean_exit(EXIT_SUCCESS); + clean_exit_with_status(EXIT_SUCCESS); return 0; } @@ -265,6 +304,7 @@ { struct option opts[] = { {"confdir", 1, 0, 'c'}, + {"clientmax", 1, 0, 'C'}, {"debug", 0, 0, 'd'}, {"eventfile", 1, 0, 'e'}, {"foreground", 0, 0, 'f'}, @@ -274,9 +314,11 @@ {"nosocket", 1, 0, 'S'}, {"version", 0, 0, 'v'}, {"help", 0, 0, 'h'}, + {"lockfile", 1, 0, 'L'}, {NULL, 0, 0, 0}, }; const char *opts_help[] = { + "Set the limit on non-root socket connections.",/* clientmax */ "Set the configuration directory.", /* confdir */ "Increase debugging level (implies -f).",/* debug */ "Use the specified file for events.", /* eventfile */ @@ -287,6 +329,7 @@ "Do not listen on a UNIX socket (overrides -s).",/* nosocket */ "Print version information.", /* version */ "Print this message.", /* help */ + "Use the specified file to lock the daemon.", /* lockfile */ }; struct option *opt; const char **hlp; @@ -294,7 +337,7 @@ for (;;) { int i; - i = getopt_long(*argc, *argv, "c:de:fg:m:s:Svh", opts, NULL); + i = getopt_long(*argc, *argv, "c:C:de:fg:m:s:SvhL:", opts, NULL); if (i == -1) { break; } @@ -302,6 +345,9 @@ case 'c': confdir = optarg; break; + case 'C': + clientmax = strtol(optarg, NULL, 0); + break; case 'd': foreground = 1; acpid_debug++; @@ -327,6 +373,9 @@ case 'v': printf(PACKAGE "-" VERSION "\n"); exit(EXIT_SUCCESS); + case 'L': + lockfile = optarg; + break; case 'h': default: fprintf(stderr, "Usage: %s [OPTIONS]\n", progname); @@ -412,6 +461,11 @@ } openlog(PACKAGE, log_opts, LOG_DAEMON); + /* Debian: restrict logging to >= NOTICE; #447200 */ + if (!acpid_debug) { + setlogmask(LOG_UPTO(LOG_NOTICE)); + } + /* set up stdin, stdout, stderr to /dev/null */ if (dup2(nullfd, STDIN_FILENO) != STDIN_FILENO) { fprintf(stderr, "%s: dup2: %s\n", progname, strerror(errno)); @@ -432,11 +486,17 @@ } static void -clean_exit(int sig) +clean_exit_with_status(int status) { acpid_cleanup_rules(1); acpid_log(LOG_NOTICE, "exiting\n"); - exit(EXIT_SUCCESS); + exit(status); +} + +static void +clean_exit(int sig) +{ + clean_exit_with_status(EXIT_SUCCESS); } static void --- acpid-1.0.6.orig/ud_socket.c +++ acpid-1.0.6/ud_socket.c @@ -103,3 +103,10 @@ return fd; } +int +ud_get_peercred(int fd, struct ucred *cred) +{ + socklen_t len = sizeof(struct ucred); + getsockopt(fd, SOL_SOCKET, SO_PEERCRED, cred, &len); + return 0; +} --- acpid-1.0.6.orig/acpid.8 +++ acpid-1.0.6/acpid.8 @@ -16,7 +16,10 @@ .PP \fIRules\fP are defined by simple configuration files. \fBacpid\fP will look in a configuration directory (\fI/etc/acpi/events\fP by default), -and parse all files that do not begin with a period ('.'). Each file must +and parse all files that fit to a runparts style naming convention. This means +that files containing a dot and contain characters different from a-z and 0-9 +would be ignored. Debian implementation differs at this point from standard +acpid. Each file must define two things: an \fIevent\fP and an \fIaction\fP. Any blank lines, or lines where the first character is a pound sign ('#') are ignored. Extraneous lines are flagged as warnings, but are not fatal. Each line has three tokens: @@ -47,7 +50,7 @@ socket except in the case of a SIGHUP or \fBacpid\fP exiting. .PP .B acpid -will log all of it's activities, as well as the stdout and stderr of any +will log all of its activities, as well as the stdout and stderr of any actions to syslog. .PP All the default file and directories can be changed with commandline options. @@ -57,6 +60,10 @@ This option changes the directory in which \fBacpid\fP looks for rule configuration files. Default is \fI/etc/acpi/events\fP. .TP 12 +.BI \-C "\fR, \fP" \--clientmax " number" +This option changes the maximum number of non-root socket connections which +can be made to the \fBacpid\fP socket. Default is \fI256\fP. +.TP 12 .BI \-d "\fR, \fP" \--debug This option increases the \fBacpid\fP debug level by one. If the debug level is non-zero, \fBacpid\fP will run in the foreground, and will log to --- acpid-1.0.6.orig/Makefile +++ acpid-1.0.6/Makefile @@ -21,7 +21,7 @@ MAN8 = acpid.8 acpi_listen.8 MAN8GZ = $(MAN8:.8=.8.gz) -CFLAGS = -Wall -Werror -g $(DEFS) +CFLAGS = -Wall -Werror -D_GNU_SOURCE -g $(DEFS) DEFS = -DVERSION="\"$(VERSION)\"" all: $(PROGS) --- acpid-1.0.6.orig/debian/acpid.default +++ acpid-1.0.6/debian/acpid.default @@ -0,0 +1,12 @@ +# Specify options for acpid startup, Debian default is to enable the +# use of sockets at a non-default position +OPTIONS="-s /var/run/acpid.socket" + +# Specify modules to load on acpid's startup +# MODULES may be uncommented to load "none", contain the string "all" +# to load all acpi related modules or simply a space seperated list +# of modules to be probed. +#MODULES="battery ac processor button fan thermal" +# using all allows us to drop extra modules in drivers/acpi and have them +# be autoloaded. +MODULES="all" --- acpid-1.0.6.orig/debian/powerbtn.sh +++ acpid-1.0.6/debian/powerbtn.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# /etc/acpi/powerbtn.sh +# Initiates a shutdown when the power putton has been +# pressed. + +# Skip if we just in the middle of resuming. +test -f /var/lock/acpisleep && exit 0 + +# If gnome-power-manager, kded4, dalston-power-applet or xfce4-power-manager +# are running, let them handle policy This is effectively the same as +# 'acpi-support's '/usr/share/acpi-support/policy-funcs' file. + +if pidof gnome-power-manager kded4 dalston-power-applet xfce4-power-manager > /dev/null; then + exit +fi + +# If all else failed, just initiate a plain shutdown. +/sbin/shutdown -h now "Power button pressed" --- acpid-1.0.6.orig/debian/rules +++ acpid-1.0.6/debian/rules @@ -0,0 +1,54 @@ +#! /usr/bin/make -f + +export DH_VERBOSE=1 + +build: build-stamp + +build-stamp: + dh_testdir + chmod g-s -R * + $(MAKE) + $(MAKE) man + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + [ ! -f Makefile ] || $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean + dh_installdirs + # Install powerbtn.sh script and make it executable + install -m 755 -D debian/powerbtn.sh debian/acpid/etc/acpi/powerbtn.sh + +binary: binary-arch binary-indep + +binary-indep: + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs Changelog + dh_installdocs + dh_installinit -- start 10 2 3 4 5 . stop 21 1 . + dh_install + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: build clean binary-indep binary-arch binary install --- acpid-1.0.6.orig/debian/acpid.postrm +++ acpid-1.0.6/debian/acpid.postrm @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +if [ "$1" = purge ]; then + rm -f /var/backups/acpid-cruft.tar.gz +fi + +#DEBHELPER# --- acpid-1.0.6.orig/debian/acpid.postinst +++ acpid-1.0.6/debian/acpid.postinst @@ -0,0 +1,29 @@ +#!/bin/sh + +set -e + +# Remove shutdown and reboot links; this init script does not need them. +if dpkg --compare-versions "$2" lt "1.0.4-5ubuntu2"; then + rm -f /etc/rc0.d/K21acpid /etc/rc6.d/K21acpid +fi + +HAL_NEEDS_RESTARTING=no +case "$1" in + configure|reconfigure) + # + if [ -x /etc/init.d/hal ] && dpkg --compare-versions "$2" ge-nl 1.0.4-5ubuntu4 && [ -f /var/run/hald/hald.pid ]; then + HAL_NEEDS_RESTARTING=yes + invoke-rc.d hal stop + fi + ;; +esac + +#DEBHELPER# + +case "$1" in + configure|reconfigure) + if [ -x /etc/init.d/hal ] && dpkg --compare-versions "$2" ge-nl 1.0.4-5ubuntu4 && [ "$HAL_NEEDS_RESTARTING" = "yes" ]; then + invoke-rc.d hal start + fi + ;; +esac --- acpid-1.0.6.orig/debian/changelog +++ acpid-1.0.6/debian/changelog @@ -0,0 +1,876 @@ +acpid (1.0.6-9ubuntu8) karmic; urgency=low + + * debian/powerbtn.sh: add xfce4-power-manager to the list of handlers as + well. LP: #425155 + + -- Lionel Le Folgoc Wed, 23 Sep 2009 14:53:01 +0200 + +acpid (1.0.6-9ubuntu7) karmic; urgency=low + + * debian/powerbtn.sh: + - Add dalston-power-applet to list of handlers for power + button events (part of fix for LP: #432578). + + -- Gary Lasker Fri, 18 Sep 2009 12:25:33 -0400 + +acpid (1.0.6-9ubuntu6) karmic; urgency=low + + FFE LP: #427356. + + * Replace init script with Upstart job. + - This does not load modules, unlike the init script, since these are + all loaded by ACPI:* modaliases now (and thus by udev) + * debian/control: + - Bump build-dependency on debhelper for Upstart-aware dh_installinit + + -- Scott James Remnant Tue, 15 Sep 2009 03:34:49 +0100 + +acpid (1.0.6-9ubuntu5) karmic; urgency=low + + * Upload jaunty changes to karmic + + -- Jonathan Riddell Tue, 28 Apr 2009 11:07:28 +0100 + +acpid (1.0.6-9ubuntu4.9.04.3) jaunty-proposed; urgency=low + + * Update /etc/acpi/powerbtn.sh for KDE 4 + Closes LP: #368497 + + -- Jonathan Riddell Tue, 28 Apr 2009 11:01:13 +0100 + +acpid (1.0.6-9ubuntu4.9.04.2) jaunty-security; urgency=low + + * SECURITY UPDATE: denial of service via too many open files + - acpid.*, event.c, ud_socket.*: limit the number of non-root clients, + correctly close dead connections. + - CVE-2009-0798 + + -- Marc Deslauriers Wed, 22 Apr 2009 15:09:59 -0400 + +acpid (1.0.6-9ubuntu4) intrepid; urgency=low + + * Remove the logrotate file on upgrade, as the previous one that was + installed did a "kill -USR1" on the acpid process to cause it to reload + its logfiles. As the new acpid doesn't use a log file it doesn't catch + this signal, which means that once a week acpid is killed. As it doesn't + have a logfile the logrotate file is not needed, and so is no longer + installed, but as it was a conffile it is not removed on upgrades. + Thanks to Loic Minier for his help with the fix. (LP: #263888) + - ad81211857dabeb88538e0f90c922b7c787b34c5 in Debian's pkg-acpi git repo. + + -- James Westby Wed, 24 Sep 2008 15:19:14 +0100 + +acpid (1.0.6-9ubuntu3) intrepid; urgency=low + + * Replace "multiuser" deprecated init mode in debian/rules with manual + arguments. Adapt the corresponding change in LSB init script header and + runtime dependency in debian/control (LP: #254249) + + -- Didier Roche Wed, 13 Aug 2008 19:50:50 +0200 + +acpid (1.0.6-9ubuntu2) intrepid; urgency=low + + * debian/control + - Depend on lsb-base >= 3.2-14, providing status_of_proc() + - Bump Standards-Version to 3.8.0 + * debian/acpid.init.d + - Add the 'status' action (LP: #251681) + + -- Nathan Handler Thu, 24 Jul 2008 21:03:02 -0500 + +acpid (1.0.6-9ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - init script starts earlier + - depend on sysv-rc + * removed ubuntu specific -G (lockfilegroup) options, it does + no longer apply because acpid now uses syslog by default + * disable debian update-rc.d call to make acpid run earlier on + upgrade, out packages already run early + * build with -D_GNU_SOURCE to make "struct ucred" available + (see also http://sourceware.org/bugzilla/show_bug.cgi?id=6545) + + -- Michael Vogt Mon, 02 Jun 2008 09:58:14 +0200 + +acpid (1.0.6-9) unstable; urgency=low + + * Don't depend on sysv-rc; closes: #481912 + + -- Anibal Monsalve Salazar Fri, 23 May 2008 13:50:49 +1000 + +acpid (1.0.6-8) unstable; urgency=low + + * Update watch file + + -- Anibal Monsalve Salazar Mon, 19 May 2008 19:31:31 +1000 + +acpid (1.0.6-7) unstable; urgency=low + + * Fix dash syntax error in acpid.init.d; closes: #481824 + + -- Anibal Monsalve Salazar Mon, 19 May 2008 11:54:32 +1000 + +acpid (1.0.6-6) unstable; urgency=low + + * New maintainer; closes: #481580 + * Merge Ubuntu changes + - Use MODULES="all"; closes: #449076 + - Disable printk; closes: #449078 + - Loading modules from the ubuntu directory; closes: #449080 + * Limit syslog messages to >= NOTICE to avoid spamming unless in debug mode; + patch by Loic Minier; closes: #447200 + * Include "--oknodo" in init script start action; + patch by Daniel Hahler; closes: #475785 + * Don't fail during installation; closes: #447339 + * Don't delete conffiles in /etc; closes: #444666 + * Provide power button support; closes: #444676 + * Fix typo in acpid.8; closes: #444065 + * Fix "restart/start fails"; closes: #481327, #479517 + * Fix "tar error messages on upgrade"; closes: #447099, #451220 + * Fix "init script start/stop priorities not updated on upgrades"; + closes: #462185 + * Fix the following lintian issues: + W: acpid source: debian-rules-ignores-make-clean-error line 18 + + -- Anibal Monsalve Salazar Sat, 17 May 2008 09:54:17 +1000 + +acpid (1.0.6-5.1) unstable; urgency=low + + * Non-maintainer upload. + * Correct dependency information provided in init.d script (Closes: #459493). + + -- Petter Reinholdtsen Tue, 4 Mar 2008 13:53:46 +0100 + +acpid (1.0.6-5) unstable; urgency=low + + * New mantainer. (Closes: #455197) + * debian/control: + - Bump Standards-Version: 3.7.3. + - Build-depends debhelper >=5. + - Added Homepage header. + * debian/watch, added. + + -- Jose Carlos Medeiros Tue, 15 Jan 2008 18:02:33 -0200 + +acpid (1.0.6-4) unstable; urgency=medium + + * Add lost directory /etc/acpi/events to package again. (Closes: #444667) + * Improve the last NEWS.Debian entry to be more explicit. + + -- Torsten Werner Tue, 09 Oct 2007 07:44:46 +0200 + +acpid (1.0.6-3) unstable; urgency=low + + * Stop and start hal in postinst. (Closes: #352512, #380520, #440870) + * Start acpid earlier when booting. (Closes: #320094) + * Fix call to 'dpkg --compare-versions' in postinst. + + -- Torsten Werner Mon, 24 Sep 2007 07:41:16 +0200 + +acpid (1.0.6-2) unstable; urgency=low + + * Remove old logs and logrotate conffile. + (Closes: #178894, #360170, #443385) + * Add debian/NEWS with an explanation of the change. + * Revert any changes to acpid.c corresponding to the old log mechanism. + (Closes: #388048) + * Remove the old powerbtn scripts and provide them as examples. + (Closes: #285779, #354445, #386026, #400409, #401414, #417306, #422463, #425291, #427938) + * Add option -P to shutdown in powerbtn.sh. (Closes: #365972) + + -- Torsten Werner Sun, 23 Sep 2007 16:15:42 +0200 + +acpid (1.0.6-1) unstable; urgency=low + + * New upstream release (Closes: #442383) + * Change Maintainer field to myself as requested by the former maintainer. + * Add XS-Vcs-* headers. + * Install upstream's Changelog file. + + -- Torsten Werner Tue, 18 Sep 2007 16:48:54 +0200 + +acpid (1.0.4-7.1) unstable; urgency=low + + * Non-maintainer upload. + * Fixed typo in init script (Closes: #413729). + + -- Nico Golde Thu, 29 Mar 2007 23:22:37 +0200 + +acpid (1.0.4-7) unstable; urgency=low + + * Fixed typo in manual page (Closes: #404680) + * Updated README (Closes: #360167) + * Include lsb compliant logging (Closes: #384687) + * Fixed logrotate/cron error if acpid is not running (Closes: #388038) + * Removed powerbutton scripts - these are contained in other packages + (Closes: #354445, #285779) + * Added lsb compliant init script styles (Closes: #383591) + + -- Cajus Pollmeier Mon, 5 Mar 2007 09:33:07 +0100 + +acpid (1.0.4-6) unstable; urgency=low + + * Fixed powerptn.sh to respect shutdown changes (Closes: #365972) + + -- Cajus Pollmeier Thu, 4 May 2006 08:47:06 +0200 + +acpid (1.0.4-5ubuntu9) hardy; urgency=low + + [ Daniel Hahler ] + * debian/acpid.postinst: Stop and start hal, if present. + This allows acpid to take /proc/acpi/event and hal will ignore this kernel + interface, when acpid is installed. (LP: #63450) + * debian/acpid.init.d: Add "--oknodo" to the start-stop-daemon call in + "start". The action must not fail, if acpid is already running. + + [ Michael Vogt ] + * debian/acpid.postinst: do not restart hal on dapper upgrades + (hal may hang forever because of a incompatible dbus) + * only restart if hal is actually running + + -- Michael Vogt Wed, 16 Apr 2008 16:12:12 +0200 + +acpid (1.0.4-5ubuntu8) gutsy; urgency=low + + * Fix the broken Maintainer lines in debian/control. + + -- Adam Conrad Wed, 15 Aug 2007 23:47:42 +1000 + +acpid (1.0.4-5ubuntu7) gutsy; urgency=low + + * Build package for lpia. + * Set Ubuntu maintainer address. + + -- Matthias Klose Fri, 10 Aug 2007 21:43:04 +0000 + +acpid (1.0.4-5ubuntu6) feisty; urgency=low + + * Load drivers from ubuntu directory as well as kernel acpi directory + + -- Matthew Garrett Sat, 10 Mar 2007 15:04:34 +0000 + +acpid (1.0.4-5ubuntu5) feisty; urgency=low + + * KubuntuFeistyLaptop spec: change debian/powerbtn.sh for KDE sessions: + * single KDE session: issue KDE logout dialog for user to decide + * multiple KDE sessions: send shutdown request to all KDE sessions + (this is the same behaviour as before) + + -- Luka Renko Thu, 8 Feb 2007 10:28:09 +0100 + +acpid (1.0.4-5ubuntu4) edgy; urgency=low + + * Call modprobe with -b to allow user blacklisting. Ubuntu: #49017 + + -- Scott James Remnant Thu, 14 Sep 2006 15:13:52 +0100 + +acpid (1.0.4-5ubuntu3) edgy; urgency=low + + * Add forgotten versioned-dependency on sysv-rc to get new update-rc.d + behaviour. Go me. + + -- Scott James Remnant Fri, 21 Jul 2006 01:22:57 +0100 + +acpid (1.0.4-5ubuntu2) edgy; urgency=low + + * Remove stop links from rc0 and rc6 + + -- Scott James Remnant Thu, 20 Jul 2006 23:14:18 +0100 + +acpid (1.0.4-5ubuntu1) edgy; urgency=low + + * Merge from debian unstable, remaining changes: + - Lock file and groups, + - LSB init script, + - init script level change, + - load all modules by default, + - Power button handling changes. + + -- Scott James Remnant Tue, 11 Jul 2006 17:50:13 +0100 + +acpid (1.0.4-5) unstable; urgency=low + + * Fixed problem with logrotate and Xorg where the /proc/acpi/events gets + locked by Xorg. + + -- Cajus Pollmeier Sun, 15 Jan 2006 22:23:05 +0100 + +acpid (1.0.4-4) unstable; urgency=low + + Changes by Michael Biebl: + * Adapted scripts in /etc/acpi/ to let powersaved process the acpi event if + it is running. + * Updated standards version to 3.6.2. + * Cleaned up debian/rules, make use of dh_* tools. Created the necessary + acpid.* files. + * Cleaned up debian/*, removed unused and unnecessary files. + * Fixed package to make lintian/linda happy. + + Changes by Cajus Pollmeier: + * Removed debconf integration (Closes: #336725, #336726, #333759, #331512) + * Fixed typo in acpi_listen manpage (Closes: #342743) + + -- Cajus Pollmeier Sat, 14 Jan 2006 11:52:33 +0100 + +acpid (1.0.4-3) unstable; urgency=low + + * Added russian debconf translations (Closes: #324084) + * Added portuguese debconf translations (Closes: #329872) + * Included alternative dependency to debconf-2.0 + + -- Cajus Pollmeier Thu, 29 Sep 2005 11:08:25 +0200 + +acpid (1.0.4-2) unstable; urgency=low + + * Added logrotate control file (Closes: #306235) + * Added vietnamese debconf translations (Closes: #307598) + * Added basque debconf translations (Closes: #296865) + * Added italian debconf translations (Closes: #288224) + * Fixed amd64 specific type problem (Closes: #315070) + * Re-fixed amd64 specific type problem (Closes: #285063) + * Fixed copyright file by adding one missing original + author (Closes: #290053) + + -- Cajus Pollmeier Sat, 9 Jul 2005 12:39:49 +0200 + +acpid (1.0.4-1ubuntu11) dapper; urgency=low + + * Fix /etc/acpi/powerbtn.sh so that it doesn't bork if 'pidof' returns + multiple results. This stops the machine displaying the logout + dialogue and then immediately shutting down anyway. + (Closes: Ubuntu #46319) + + -- Paul Sladen Sat, 27 May 2006 15:54:53 +0100 + +acpid (1.0.4-1ubuntu10) dapper; urgency=low + + * Add support to set the group of the log file when acpid starts. + By default this will set it to the adm group. + + -- Daniel Silverstone Wed, 15 Feb 2006 14:04:49 +0000 + +acpid (1.0.4-1ubuntu9) dapper; urgency=low + + * Check for gnome-power-manager rather than PowerManager. The name changed + between dapper and breezy and without this, we would unconditionally shut + the system down on a powerbutton event. + * Also check for kded/klaptopdaemon and kpowersave for KDE options on the + same policy management. + * Closes: malone #31407 + + -- Daniel Silverstone Wed, 15 Feb 2006 11:41:20 +0000 + +acpid (1.0.4-1ubuntu8) breezy; urgency=low + + * Shorten and simplify init script messages + + -- Matt Zimmerman Thu, 15 Sep 2005 11:30:54 -0700 + +acpid (1.0.4-1ubuntu7) breezy; urgency=low + + * If power-manager is running, don't trigger the power button event + ourselves + + -- Matthew Garrett Tue, 30 Aug 2005 18:33:22 +0100 + +acpid (1.0.4-1ubuntu6) breezy; urgency=low + + * Start acpid before dbus is started - hal needs acpid to be running + already + + -- Matthew Garrett Tue, 30 Aug 2005 17:10:48 +0100 + +acpid (1.0.4-1ubuntu5) breezy; urgency=low + + * Interact with the new locking model in acpi-support + * Fix gcc-4.0 compile error + + -- Matthew Garrett Mon, 22 Aug 2005 22:12:52 +0100 + +acpid (1.0.4-1ubuntu4) hoary; urgency=low + + * Turn off kernel printks if we're not verbose during module loading + + -- Thom May Wed, 2 Mar 2005 17:45:36 +0000 + +acpid (1.0.4-1ubuntu3) hoary; urgency=low + + * Check for the presence of a lockfile, and don't process events if it's + there (Ubuntu: #6026) + + -- Thom May Tue, 1 Feb 2005 12:27:44 +0000 + +acpid (1.0.4-1ubuntu2) hoary; urgency=low + + * Use the new -Q argument to modprobe, add depend on the correct + module-init-tools + * Default back to trying to autoload everything (Ubuntu #4077) + + -- Thom May Fri, 14 Jan 2005 13:48:24 +0000 + +acpid (1.0.4-1ubuntu1) hoary; urgency=low + + * Resynchronise with Debian, resolved minor merging conflict. + + -- Martin Pitt Thu, 11 Nov 2004 10:38:26 +0100 + +acpid (1.0.4-1) unstable; urgency=low + + * New upstream release + * I'm dropping support for older, acpi broken kernels now. Time to + clean up. + + -- Cajus Pollmeier Mon, 1 Nov 2004 11:49:33 +0100 + +acpid (1.0.3-21ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- Scott James Remnant Wed, 27 Oct 2004 12:05:00 +0100 + +acpid (1.0.3-21) unstable; urgency=low + + * Fixed dcop problem for shutdown (Closes:#274339) + + -- Cajus Pollmeier Fri, 1 Oct 2004 11:10:24 +0200 + +acpid (1.0.3-20) unstable; urgency=high + + * Added detection for non files in run-parts code (Closes:#268203) + + -- Cajus Pollmeier Mon, 30 Aug 2004 19:51:41 +0200 + +acpid (1.0.3-19ubuntu12) warty; urgency=low + + * Disable loading the platform specific acpi modules. (Warty #1451) + + -- Thom May Wed, 6 Oct 2004 14:18:58 +0100 + +acpid (1.0.3-19ubuntu11) warty; urgency=low + + * use xargs -r so we don't fail in the case of no acpi modules (Warty #1466) + + -- Thom May Mon, 20 Sep 2004 12:36:52 +0100 + +acpid (1.0.3-19ubuntu10) warty; urgency=low + + * Added versioned depend on lsb-base + + -- Nathaniel McCallum Fri, 3 Sep 2004 14:45:49 -0400 + +acpid (1.0.3-19ubuntu9) warty; urgency=low + + * log_warning_msg for failed modules, don't bomb out tho. (Warty 983, 991) + + -- Thom May Fri, 3 Sep 2004 17:08:34 +0100 + +acpid (1.0.3-19ubuntu8) warty; urgency=low + + * If a module is already loaded, log_success_msg rather than log_warning_msg + + -- Matt Zimmerman Thu, 2 Sep 2004 16:06:16 -0700 + +acpid (1.0.3-19ubuntu7) warty; urgency=low + + * debian/init: pretty initscript + + -- Nathaniel McCallum Thu, 2 Sep 2004 15:06:13 -0400 + +acpid (1.0.3-19ubuntu6) warty; urgency=low + + * install initrd script + + -- Thom May Fri, 27 Aug 2004 17:14:00 +0100 + +acpid (1.0.3-19ubuntu5) warty; urgency=low + + * Revert -4, since that causes the acpid socket to be reaped + + -- Thom May Tue, 24 Aug 2004 10:34:05 +0100 + +acpid (1.0.3-19ubuntu4) warty; urgency=low + + * Ensure acpid starts as early as possible, so we don't melt Scott's laptop + + -- Thom May Thu, 19 Aug 2004 14:04:55 +0100 + +acpid (1.0.3-19ubuntu3) warty; urgency=low + + * Load all modules + + -- Thom May Wed, 18 Aug 2004 14:11:45 +0100 + +acpid (1.0.3-19ubuntu2) warty; urgency=low + + * Get rid of FTBFS errors. + + -- LaMont Jones Sat, 31 Jul 2004 04:49:10 +0000 + +acpid (1.0.3-19ubuntu1) warty; urgency=low + + * Disable superfluous debconf note when acpi support is not present + (Warty Bug#289) + + -- Matt Zimmerman Tue, 27 Jul 2004 13:26:05 -0700 + +acpid (1.0.3-19) unstable; urgency=low + + * Update dutch translations (Closes:#250719) + * Added turkish translations (Closes:#252933) + + -- Cajus Pollmeier Fri, 28 May 2004 19:41:16 +0200 + +acpid (1.0.3-18) unstable; urgency=low + + * Fixed manpage to contain hint to runparts stylish naming convention + in /etc/acpid/events (Closes:#250066) + + -- Cajus Pollmeier Sat, 22 May 2004 10:33:13 +0200 + +acpid (1.0.3-17) unstable; urgency=low + + * Added amd64 to list of supported architectures (Closes:#249055) + + -- Cajus Pollmeier Fri, 14 May 2004 21:22:53 +0200 + +acpid (1.0.3-16) unstable; urgency=low + + * Added czech po-debconf translation (Closes:#247377) + * Modified init scripts start-stop daemon call to retry stopping + acpid after two seconds (Closes:#247130) + * Modified init script to check for ACPI presence in kernel + _before_ doing any actions (Closes:#247490) + + -- Cajus Pollmeier Fri, 7 May 2004 22:27:40 +0200 + +acpid (1.0.3-15) unstable; urgency=low + + * Fixed powerbutton script which did a shutdown when a + KDE user was logged in. Now it skips the shutdown, + because kdm will do it for us. + + -- Cajus Pollmeier Fri, 23 Apr 2004 18:06:16 +0200 + +acpid (1.0.3-14) unstable; urgency=low + + * Fixed postrm script to clean some lost config files. (Closes: #242273) + + -- Cajus Pollmeier Thu, 8 Apr 2004 11:04:05 +0200 + +acpid (1.0.3-13) unstable; urgency=low + + * Removed support for configuring list of modules with debconf. I can't + spend hours in fullfilling all wishes currently. Don't think anyone really + needs this feature - and if: This is more an issue for a tool that detects + hardware than one for the daemon itself. Implicitly closes: #241367. + * Updated init script to skip loading of modules that are not present in + system, but are configured in defaults file. + + -- Cajus Pollmeier Thu, 1 Apr 2004 06:56:27 +0200 + +acpid (1.0.3-12) unstable; urgency=low + + * Fixed possible problem in config script when installing for the + first time (Closes:#241012) + + -- Cajus Pollmeier Tue, 30 Mar 2004 13:06:01 +0200 + +acpid (1.0.3-11) unstable; urgency=low + + * Included danish translations (Closes:#240044) + + -- Cajus Pollmeier Thu, 25 Mar 2004 19:52:46 +0100 + +acpid (1.0.3-10) unstable; urgency=low + + * Avoided overwriting of manual changes in defaults file (Closes:#239635) + * Replaced init call by normal shutdown with more informative + message (Closes:#239583) + * Included upstream changelog (Closes:#235530) + + -- Cajus Pollmeier Tue, 23 Mar 2004 21:33:31 +0100 + +acpid (1.0.3-9) unstable; urgency=low + + * Made acpid close all used filehandles (Closes:#239350) + + -- Cajus Pollmeier Mon, 22 Mar 2004 14:56:57 +0100 + +acpid (1.0.3-8) unstable; urgency=low + + * Fixed clean target of debian/rules to call dh_clean (Closes:#239239) + + -- Cajus Pollmeier Mon, 22 Mar 2004 11:14:36 +0100 + +acpid (1.0.3-7) unstable; urgency=low + + * Added dutch po-debconf translation (Closes:#237816) + * Added greek po-debconf translation (Closes:#237847) + + -- Cajus Pollmeier Sun, 21 Mar 2004 11:40:48 +0100 + +acpid (1.0.3-6) unstable; urgency=low + + * Modified start script to have the 2.6 module loading + style (Closes:#236703) + + -- Cajus Pollmeier Fri, 12 Mar 2004 16:34:42 +0100 + +acpid (1.0.3-5) unstable; urgency=low + + * Changed description to a coffee cooking variant (Closes:#237199) + + -- Cajus Pollmeier Wed, 10 Mar 2004 20:51:52 +0100 + +acpid (1.0.3-4) unstable; urgency=low + + * Fixed typo in template, that made it in again. (Closes:#236005) + * Included French translations, thanks to Clement Stenac. (Closes:#236375) + + -- Cajus Pollmeier Thu, 4 Mar 2004 07:55:24 +0100 + +acpid (1.0.3-3) unstable; urgency=low + + * Included Japanese translations, thanks to Hideki Yamane. (Closes:#235320) + * Included Brazilian Portuguese translations, thanks to + Andre Luis Lopes (Closes:#235462) + * Workaround for non working postinst configure installed. (Closes:#234270) + + -- Cajus Pollmeier Sun, 29 Feb 2004 11:26:06 +0100 + +acpid (1.0.3-2) unstable; urgency=low + + * Added a sleep between stop and start in the init-scripts restart + condition. This should fix the logrotate problem. (Closes:#234283) + + -- Cajus Pollmeier Wed, 25 Feb 2004 13:15:53 +0100 + +acpid (1.0.3-1) unstable; urgency=high + + * New upstream release + + -- Cajus Pollmeier Wed, 25 Feb 2004 10:08:34 +0100 + +acpid (1.0.2-12) unstable; urgency=low + + * Added missing true condition in postinstall script (Closes: #234274) + + -- Cajus Pollmeier Mon, 23 Feb 2004 10:08:19 +0100 + +acpid (1.0.2-11) unstable; urgency=high + + * Switched to invoke-rc.d in prerm script. (Closes: #234161) + * Removed a - for some users - confusing message from debconf + templates. (Closes: #234179) + + -- Cajus Pollmeier Sun, 22 Feb 2004 10:29:11 +0100 + +acpid (1.0.2-10) unstable; urgency=low + + * Fix typo in events file - powerbtn/powerbtn.sh (Closes:#233248) + * Doing workaround in rules to remove setgid bits. Can't upload new + orig.tar.gz. (Closes: #233628) + * Changed the standard 'all' into a list of most common modules + + -- Cajus Pollmeier Tue, 17 Feb 2004 20:28:42 +0100 + +acpid (1.0.2-9) unstable; urgency=high + + * Yes, yes. I commented out this line, because I've acpi in + built into my kernel. Enabled it again. (Closes: #232400) + * Fixed some lintian related issues. + + -- Cajus Pollmeier Sun, 15 Feb 2004 09:23:31 +0100 + +acpid (1.0.2-8) unstable; urgency=low + + * Finetuning in init script for automatic module loading (Closes: #232400) + * Added debconf script to help user, made 'load all modules' the + default. + * Unmasked signals so that processes started from acpid can receive + TERM signals. (Closes: #206525) + * Added changes from CVS. New upstream release is comming soon. + + -- Cajus Pollmeier Thu, 12 Feb 2004 18:58:29 +0100 + +acpid (1.0.2-7) unstable; urgency=low + + * Renamed acpid socket. gnome-applet seems to have a compiled + in default for /var/run/acpid.socket. (Closes: #217932) + + -- Cajus Pollmeier Fri, 31 Oct 2003 21:15:17 +0100 + +acpid (1.0.2-6) unstable; urgency=low + + * Fixed module loader in init script. Credits go to Tim Wright. + + -- Cajus Pollmeier Wed, 22 Oct 2003 20:48:17 +0200 + +acpid (1.0.2-5) unstable; urgency=low + + * Ok. Removing socket support was no good idea. Obviously there + are some programms that depend on it. Notice, that the socket + is on a non standard location currently. (Closes: #207926) + + -- Cajus Pollmeier Thu, 9 Oct 2003 07:10:51 +0200 + +acpid (1.0.2-4) unstable; urgency=low + + * Removed socket support for Debian. I currently don't see any use + in it. + * Changed postrm to clean only config files (Closes: #202858) + * Added acpid to logrotate.d (Closes: #200705) + + -- Cajus Pollmeier Fri, 5 Sep 2003 16:51:43 +0200 + +acpid (1.0.2-3) unstable; urgency=low + + * Make --purge remove /etc/acpi directory (Closes: #197981) + + -- Cajus Pollmeier Thu, 19 Jun 2003 08:43:48 +0200 + +acpid (1.0.2-2) unstable; urgency=low + + * Fixed module loading for kernel 2.5. Modules now have .ko as extension + so that the former .o method wouldn't work (Closes: #193709) + + -- Cajus Pollmeier Sun, 18 May 2003 12:06:04 +0200 + +acpid (1.0.2-1) unstable; urgency=low + + * New upstream release + + -- Cajus Pollmeier Wed, 14 May 2003 07:39:25 +0200 + +acpid (1.0.1-8) unstable; urgency=low + + * Fixed automatic module loading script regex (Closes: #192711) + + -- Cajus Pollmeier Sat, 10 May 2003 10:27:14 +0200 + +acpid (1.0.1-7) unstable; urgency=low + + * Changed poweroff script to be dcop aware (Closes: #187493) + * Made title line in control file to make it more meaningly (Closes: #181774) + + -- Cajus Pollmeier Fri, 4 Apr 2003 19:56:34 +0200 + +acpid (1.0.1-6) unstable; urgency=low + + * load modules even when acpi.o is not compiled in kernel (Closes: #173173) + * updated standards-version + + -- Cajus Pollmeier Mon, 30 Dec 2002 13:58:26 +0100 + +acpid (1.0.1-5) unstable; urgency=low + + * added modules autoloading in startup script, see /etc/default/acpid (Closes: #173173) + + -- Cajus Pollmeier Sun, 29 Dec 2002 19:51:32 +0100 + +acpid (1.0.1-4) unstable; urgency=high + + * removed double freed pointer in event.c (Closes: #153288) + + -- Cajus Pollmeier Tue, 20 Aug 2002 08:05:31 +0100 + +acpid (1.0.1-3) unstable; urgency=high + + * forgot do close ia64 bug (Closes: #141101) + * made run-parts stylish /etc/acpi/events (Closes: #141350) + * renamed samples to examples and added joeys examples (Closes: #141351) + + -- Cajus Pollmeier Sat, 6 Apr 2002 10:21:15 +0100 + +acpid (1.0.1-2) unstable; urgency=high + + * Added ia64 for build + + -- Cajus Pollmeier Fri, 5 Apr 2002 08:34:01 +0100 + +acpid (1.0.1-1) unstable; urgency=high + + * new upstream release + * Fixed event handling to fit the new specs - again + + -- Cajus Pollmeier Sat, 9 Mar 2002 12:10:51 +0100 + +acpid (1.0.0-4) unstable; urgency=high + + * Changed priority to optional (Closes: #135578) + * Fixed event handling to fit the new specs + + -- Cajus Pollmeier Sat, 9 Mar 2002 12:10:51 +0100 + +acpid (1.0.0-3) unstable; urgency=high + + * Removed incompatibility message + * Closed bugs that should have been fixed with 1.0.0-2 (Closes: #130934, #127451) + * Fixed event handling with kernels patched with acpi-devel code + * Added reload option to the initscript (Closes: #129425) + + -- Cajus Pollmeier Fri, 1 Mar 2002 15:13:06 +0100 + +acpid (1.0.0-2) unstable; urgency=low + + * Fixed logfile not beeing truncated + * Changed line width of short description to less than 60 characters + * Close bugs not related to this upstream release (Closes: #67465, #108796, #63956, #109559, #110698, #107047) + + -- Cajus Pollmeier Thu, 1 Nov 2001 13:30:16 +0100 + +acpid (1.0.0-1) unstable; urgency=low + + * New upstream release + * Fixed read_line to work with unpatched 2.4.x kernels. + + -- Cajus Pollmeier Mon, 10 Aug 2001 12:12:41 +0200 + +acpid (0.2001051000-1) unstable; urgency=low + + * New upstream release (Closes: #97277, #104266) + * New maintainer + * 'acpictl' is no longer in the acpid package. (Closes: #79498) + * 'acpid' doesn't need build-depends anymore (Closes: #105751) + + -- Robert van der Meulen Mon, 25 Jun 2001 16:01:12 +0200 + +acpid (0.2000071100-1) unstable; urgency=low + + * New upstream release + + -- Wichert Akkerman Wed, 12 Jul 2000 20:57:07 -0400 + +acpid (0.2000052200-1) unstable; urgency=low + + * New upstream release + + -- Wichert Akkerman Tue, 23 May 2000 13:41:51 +0200 + +acpid (0.2000042500-1) unstable; urgency=low + + * New upstream release + * Fix a typo in the init-script + * upstream changed the buildsystem again, updated debian/rules accordingly + * Stop via executable, not pid-file (which doesn't exist) + + -- Wichert Akkerman Mon, 1 May 2000 23:00:46 +0200 + +acpid (0.20000317-2) unstable; urgency=low + + * Create /usr/doc compatibility symlinks + + -- Wichert Akkerman Fri, 7 Apr 2000 14:26:31 +0200 + +acpid (0.20000317-1) experimental; urgency=low + + * New snapshot + + -- Wichert Akkerman Mon, 3 Apr 2000 00:50:17 +0200 + +acpid (0.20000316-1) experimental; urgency=low + + * Initial release + + -- Wichert Akkerman Thu, 16 Mar 2000 12:24:51 +0100 + --- acpid-1.0.6.orig/debian/watch +++ acpid-1.0.6/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/acpid/ acpid-([\d]+[\.\d]*)\.tar\.gz --- acpid-1.0.6.orig/debian/acpid.manpages +++ acpid-1.0.6/debian/acpid.manpages @@ -0,0 +1,2 @@ +acpid.8 +acpi_listen.8 --- acpid-1.0.6.orig/debian/powerbtn +++ acpid-1.0.6/debian/powerbtn @@ -0,0 +1,13 @@ +# /etc/acpi/events/powerbtn +# This is called when the user presses the power button and calls +# /etc/acpi/powerbtn.sh for further processing. + +# Optionally you can specify the placeholder %e. It will pass +# through the whole kernel event message to the program you've +# specified. + +# We need to react on "button power.*" and "button/power.*" because +# of kernel changes. + +event=button[ /]power +action=/etc/acpi/powerbtn.sh --- acpid-1.0.6.orig/debian/acpid.init.d +++ acpid-1.0.6/debian/acpid.init.d @@ -0,0 +1,115 @@ +#! /bin/sh -e +### BEGIN INIT INFO +# Provides: acpid +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# X-Start-Before: kdm gdm xdm hal +# X-Stop-After: kdm gdm xdm hal +# Default-Start: 2 3 4 5 +# Default-Stop: 1 +# Short-Description: Start the Advanced Configuration and Power Interface daemon +# Description: Provide a socket for X11, hald and others to multiplex +# kernel ACPI events. +### END INIT INFO + +# Check for daemon presence +test -x /usr/sbin/acpid || exit 0 + +# Check for ACPI support on kernel side +[ -d "/proc/acpi" ] || exit 0 + +# Include acpid defaults if available +OPTIONS="" +if [ -f "/etc/default/acpid" ] ; then + . /etc/default/acpid +fi + +# Get lsb functions +. /lib/lsb/init-functions +. /etc/default/rcS + +if [ "$VERBOSE" = "no" ]; then + MODPROBE_OPTIONS="$MODPROBE_OPTIONS --quiet" + export MODPROBE_OPTIONS +fi + +# As the name says. If the kernel supports modules, it'll try to load +# the ones listed in "MODULES". +load_modules() { + PRINTK=$(cat /proc/sys/kernel/printk) + [ "$VERBOSE" = "no" ] && echo "0 0 0 0" > /proc/sys/kernel/printk + + LIST="$(/sbin/lsmod | awk '!/Module/ {print $1}')" + + # Get list of available modules + LOC="/lib/modules/$(uname -r)/kernel/drivers/acpi" + LOC2="/lib/modules/$(uname -r)/kernel/ubuntu/acpi" + if [ -d "$LOC" ]; then + MODAVAIL="$( ( find $LOC -type f -name "*.o" -printf "basename %f .o\n"; \ + find $LOC -type f -name "*.ko" -printf "basename %f .ko\n" ) | /bin/sh )" + else + MODAVAIL="" + fi + + if [ -d "$LOC2" ]; then + MODAVAIL="$MODAVAIL $( ( find $LOC2 -type f -name "*.o" -printf "basename %f .o\n"; \ + find $LOC2 -type f -name "*.ko" -printf "basename %f .ko\n" ) | /bin/sh )" + fi + + if [ "$MODULES" = "all" ]; then + MODULES="$MODAVAIL" + fi + + if [ -n "$MODULES" ]; then + log_begin_msg "Loading ACPI modules..." + STATUS=0 + for mod in $MODULES; do + echo $MODAVAIL | grep -q -w "$mod" || continue + if echo $LIST | grep -q -w "$mod"; then + [ "$VERBOSE" != "no" ] && log_success_msg "Module already loaded: $mod" + else + if modprobe -b $mod 2>/dev/null; then + [ "$VERBOSE" != "no" ] && log_success_msg "Loaded module: $mod" + else + if [ "$VERBOSE" != "no" ]; then + log_warning_msg "Unable to load module: $mod" + fi + fi + fi + done + log_end_msg $STATUS + fi + echo "$PRINTK" > /proc/sys/kernel/printk +} + +case "$1" in + start) + [ -f /proc/modules ] && load_modules + log_begin_msg "Starting ACPI services..." + start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/acpid -- -c /etc/acpi/events $OPTIONS + log_end_msg $? + ;; + stop) + log_begin_msg "Stopping ACPI services..." + start-stop-daemon --stop --quiet --oknodo --retry 2 --exec /usr/sbin/acpid + log_end_msg $? + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + reload|force-reload) + log_begin_msg "Reloading ACPI services..." + start-stop-daemon --stop --signal 1 --exec /usr/sbin/acpid + log_end_msg $? + ;; + status) + status_of_proc /usr/sbin/acpid acpid && exit 0 || exit $? + ;; + *) + log_success_msg "Usage: /etc/init.d/acpid {start|stop|restart|reload|force-reload|status}" + exit 1 +esac + +exit 0 --- acpid-1.0.6.orig/debian/copyright +++ acpid-1.0.6/debian/copyright @@ -0,0 +1,14 @@ +This is the Debian GNU/Linux prepackaged version of acpid. +It was packaged by Cajus Pollmeier +from sources obtained from http://acpid.sourceforge.net. + +Copyright: + +Copyright (C) 2000 Andrew Henroid + +License: + +acpid is distributed under the terms of the GNU General Public License, +version 2. On Debian GNU/Linux system you can find a copy of this +license in `/usr/share/common-licenses/GPL'. + --- acpid-1.0.6.orig/debian/control +++ acpid-1.0.6/debian/control @@ -0,0 +1,25 @@ +Source: acpid +Section: admin +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Anibal Monsalve Salazar +Uploaders: Michael Meskes +Standards-Version: 3.8.0 +Build-Depends: debhelper (>= 7.3.15ubuntu2) +XS-Vcs-Svn: https://bollin.googlecode.com/svn/acpid/trunk +XS-Vcs-Browser: http://bollin.googlecode.com/svn/acpid/trunk +Homepage: http://acpid.sourceforge.net/ + +Package: acpid +Architecture: i386 ia64 amd64 lpia +Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.2-14), module-init-tools (>=3.1-rel-2ubuntu2) +Description: Utilities for using ACPI power management + Modern computers support the Advanced Configuration and Power Interface (ACPI) + to allow intelligent power management on your system and to query battery and + configuration status. + . + ACPID is a completely flexible, totally extensible daemon for delivering + ACPI events. It listens on a file (/proc/acpi/event) 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 admin. --- acpid-1.0.6.orig/debian/compat +++ acpid-1.0.6/debian/compat @@ -0,0 +1 @@ +5 --- acpid-1.0.6.orig/debian/README.debian +++ acpid-1.0.6/debian/README.debian @@ -0,0 +1,40 @@ +acpid for Debian +================ + +Kernel requirements: +- Unpatched 2.4.x where x >= 7 +- Unpatched 2.5.x should work, not tested +- Unpatched 2.6.x just works +- Using acpi patches from http://sourceforge.net/project/acpi. The newest is your friend. + +General: +The acpid daemon now handles user defined events, too. Place event files +under /etc/acpi/events. + +If an event occurs, acpid recurses through the event files in order to +see if the regex defined after "event" matches. If they do, action is +executed. + +Example: /etc/acpi/events/power + +# This file handles the actions for the power button +event=button power.* +action=/sbin/init 0 + +# This is the new style, introduced by the acpi patch acpi-20020329. +#event=button/power .* +#action=/sbin/init 0 + +NOTE: This has changed in acpi development code! See /etc/acpi/default.sh + for more information. + +Your script will get the complete event string (as reported by +/proc/acpid/events), if you use %e as a parameter of your script. +You may want to split this by calling set $*. $1 then holds the +event group, $2 takes the event and $3 and $4 take the values as +reported by the kernel. + +When using acpid with modules, you can use /etc/default/acpid in order +to specify modules to be loaded at startup. + +Cajus Pollmeier , Fri, 08 Sept 2001 11:58:48 +0200 --- acpid-1.0.6.orig/debian/acpid.upstart +++ acpid-1.0.6/debian/acpid.upstart @@ -0,0 +1,14 @@ +# acpid - ACPI daemon +# +# The ACPI daemon provides a socket for other daemons to multiplex kernel +# ACPI events from, and a framework for reacting to those events. + +description "ACPI daemon" + +start on runlevel [2345] +stop on runlevel [!2345] + +expect fork +respawn + +exec acpid -c /etc/acpi/events -s /var/run/acpid.socket --- acpid-1.0.6.orig/debian/acpid.preinst +++ acpid-1.0.6/debian/acpid.preinst @@ -0,0 +1,29 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +# Remove a no-longer used conffile +rm_conffile() { + PKGNAME="$1" + CONFFILE="$2" + if [ -e "$CONFFILE" ]; then + md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" + old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`" + if [ "$md5sum" != "$old_md5sum" ]; then + echo "Obsolete conffile $CONFFILE has been modified by you." + echo "Saving as $CONFFILE.dpkg-bak ..." + mv -f "$CONFFILE" "$CONFFILE".dpkg-bak + else + echo "Removing obsolete conffile $CONFFILE ..." + rm -f "$CONFFILE" + fi + fi +} +case "$1" in + install|upgrade) + rm_conffile acpid /etc/logrotate.d/acpid + ;; +esac + --- acpid-1.0.6.orig/debian/acpid.dirs +++ acpid-1.0.6/debian/acpid.dirs @@ -0,0 +1 @@ +/etc/acpi/events --- acpid-1.0.6.orig/debian/acpid.install +++ acpid-1.0.6/debian/acpid.install @@ -0,0 +1,7 @@ +debian/powerbtn etc/acpi/events/ +examples/default usr/share/doc/acpid/examples/ +examples/default.sh usr/share/doc/acpid/examples/ +examples/ac usr/share/doc/acpid/examples/ +examples/ac.sh usr/share/doc/acpid/examples/ +acpi_listen usr/bin +acpid usr/sbin --- acpid-1.0.6.orig/debian/acpid.docs +++ acpid-1.0.6/debian/acpid.docs @@ -0,0 +1 @@ +README --- acpid-1.0.6.orig/examples/ac +++ acpid-1.0.6/examples/ac @@ -0,0 +1,11 @@ +# /etc/acpid/events/ac +# This detects changes to AC power status, and passes them to +# /etc/acpi/ac.sh for further processing. + +# Optionally you can specify the placeholder %e. It will pass +# through the whole kernel event message to the program you've +# specified. + +event=ac_adapter +action=/etc/acpi/ac.sh + --- acpid-1.0.6.orig/examples/default +++ acpid-1.0.6/examples/default @@ -0,0 +1,18 @@ +# 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 --- acpid-1.0.6.orig/examples/default.sh +++ acpid-1.0.6/examples/default.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Default acpi script that takes an entry for all actions + +set $* + +# Take care about the way events are reported +ev_type=`echo "$1" | cut -d/ -f1` +if [ "$ev_type" = "$1" ]; then + event="$2"; +else + event=`echo "$1" | cut -d/ -f2` +fi + + +case "$ev_type" in + button) + case "$event" in + power) + logger "acpid: received a shutdown request" + /sbin/init 0 + break + ;; + *) + logger "acpid: action $2 is not defined" + ;; + esac + ;; + + *) + logger "ACPI group $1 / action $2 is not defined" + ;; +esac --- acpid-1.0.6.orig/examples/ac.sh +++ acpid-1.0.6/examples/ac.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# /etc/acpid/ac.sh +# Detect loss of AC power and regaining of AC power, and take action +# appropriatly. + +# On my laptop anyway, this script doesn't not get different parameters for +# loss of power and regained power. So, I have to use a separate program to +# tell what the adapter status is. + +# This uses the spicctrl program for probing the sonypi device. +BACKLIGHT=$(spicctrl -B) + +if on_ac_power; then + # Now on AC power. + + # Tell longrun to go crazy. + longrun -f performance + longrun -s 0 100 + + # Turn up the backlight unless it's up far enough. + if [ "$BACKLIGHT" -lt 108 ]; then + spicctrl -b 108 + fi +else + # Now off AC power. + + # Tell longrun to be a miser. + longrun -f economy + longrun -s 0 50 # adjust to suite.. + + # Don't allow the screen to be too bright, but don't turn the + # backlight _up_ on removal, and don't turn it all the way down, as + # that is unusable on my laptop in most conditions. Adjust to + # taste. + if [ "$BACKLIGHT" -gt 68 ]; then + spicctrl -b 68 + fi +fi +