--- acpi-support-0.142.orig/debian/README.Debian
+++ acpi-support-0.142/debian/README.Debian
@@ -0,0 +1,78 @@
+Handling of obsolete configuration files/scripts
+------------------------------------------------
+
+As dpkg doesn't remove conffiles that are no longer provided by the
+current version of the package, we have to disable them manually so
+that they don't create trouble.
+
+Older versions of this package renamed all these files by adding a ".obsolete"
+extension. Newer versions only rename those files that were changed. Unchanged
+files are simply deleted. If you find such files in
+/etc/acpi/{events,suspend.d,resume.d}, you can safely remove them. 
+
+This renaming is required because otherwise they would be actively used
+even though they are supposed to have been removed.
+
+You can use the following command to find the files that have been renamed:
+$ dpkg -s acpi-support | grep obsolete$
+
+(If you have none, it's not a bug, it's just that you installed acpi-support
+after the last removal, or that you purged it to reinstall it properly from
+scratch).
+
+The acpi_fakekeyd daemon.
+-------------------------
+
+With the kernel only allowing key events for which a real key exists on the
+keyboard the old approach of acpi_fakekey to just send the needed event through
+an existing keyboard device does not always work. As a workaround acpi_fakekey
+now sends the generated key press event through the user level input driver and
+thus needs CONFIG_INPUT_UINPUT defined in the kernel and, if built as a module,
+the uinput module to be loaded.
+
+The "acpi-support" method for suspending.
+-----------------------------------------
+
+Older versions of acpi-support had their own scripts to control suspend and
+resume. This has been deprecated for quite some time and finally has been
+removed in 0.122-1. The scripts are stil available under
+/usr/share/doc/acpi-support/examples and can easily be copied back to their
+orignal location under /etc/acpi. Once the scripts have been installed they can
+be configured by editing /etc/default/acpi-support.
+
+To have a custom script executed on suspend, it is recommended to use pm-utils
+instead (/usr/lib/pm-utils/sleep.d/). Note that acpi-support is bypassed by
+'acpitool -s'; to enable the suspend actions defined through acpi-support, one
+must put a laptop to sleep with '/etc/acpi/sleep.sh'.
+
+If
+   (a) you are upgrading from an earlier version of "acpi-support"
+   and
+   (b) you do not have any custom scripts in /etc/acpi/*.d/
+   and
+   (c) you have custom set some variables in /etc/default/acpi-support
+       to "true"
+then
+you should be able to use the "pm-utils" method for suspending by using command
+line parameters for pm-suspend according to the following table:
+
+ variable                    pm-utils parameter
+
+ SAVE_VBE_STATE              --quirk-vbestate-restore
+ POST_VIDEO                  --quirk-vbe-post
+ SAVE_VIDEO_PCI_STATE        --quirk-save-pci
+ USE_DPMS                    --quirk-dpms-suspend
+ RADEON_LIGHT                --quirk-radeon-off
+
+You can set these parameters automatically by adding a file in
+/etc/pm/config.d/ containing a  line like
+	ADD_PARAMETERS="--quirk-vbestate-restore --quirk-vbe-post"
+
+In addition, if you had a line in /etc/default/acpi-support like
+	MODULES="module1 module2"
+Then you should add the line
+	SUSPEND_MODULES="module1 module2"
+to a file in /etc/pm/config.d/
+
+Should you experience problems when switching to pm-utils please report them.
+
--- acpi-support-0.142.orig/debian/README.source
+++ acpi-support-0.142/debian/README.source
@@ -0,0 +1,58 @@
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To configure quilt to use debian/patches instead of patches, you want
+either to export QUILT_PATCHES=debian/patches in your environment
+or use this snippet in your ~/.quiltrc:
+
+    for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
+        if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
+                export QUILT_PATCHES=debian/patches
+                break
+        fi
+    done
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+    quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+    quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches.  Then, for every file that will be modified by this patch,
+run:
+
+    quilt add <file>
+
+before editing those files.  You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly.  After editing the files, run:
+
+    quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+    quilt import -P <patch> /path/to/patch
+    quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches.  The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+    quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.
--- acpi-support-0.142.orig/debian/acpi-fakekey.dirs
+++ acpi-support-0.142/debian/acpi-fakekey.dirs
@@ -0,0 +1,3 @@
+/usr/bin
+/usr/sbin
+
--- acpi-support-0.142.orig/debian/acpi-fakekey.init
+++ acpi-support-0.142/debian/acpi-fakekey.init
@@ -0,0 +1,63 @@
+#!/bin/sh
+# INIT script to start the ACPI fakekey daemon that turns ACPI events into
+# input events via the kernel uinput module.
+
+### BEGIN INIT INFO
+# Provides:          acpi-fakekey
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:     $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      
+# Short-Description: Start acpi_fakekey daemon
+### END INIT INFO
+
+test -f /lib/lsb/init-functions || exit 1
+. /lib/lsb/init-functions
+
+case "$1" in
+  start)
+    log_action_begin_msg "Starting acpi_fakekey daemon"
+    if [ ! -d /sys/devices/virtual/misc/uinput ]; then
+	 if ! modprobe -q uinput; then
+		if ! find /lib/modules/`uname -r` -name "uinput\.*" 2>/dev/null|grep -q uinput; then
+			log_action_end_msg 1 "No suitable uinput module for running kernel found"
+		else
+			log_action_end_msg 1 "Modprobe uinput failed. Please use 'dmesg' to find out why"
+		fi
+	fi
+    fi
+
+    if start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/acpi_fakekeyd
+    then
+	log_action_end_msg 0
+    else
+	log_action_end_msg 1 "Could not start /usr/sbin/acpi_fakekeyd"
+    fi
+    ;;
+  stop)
+    log_action_begin_msg "Stopping acpi_fakekey daemon"
+    if start-stop-daemon --stop --quiet --exec /usr/sbin/acpi_fakekeyd
+    then
+	log_action_end_msg 0
+    else
+	log_action_end_msg 1 "Could not stop /usr/sbin/acpi_fakekeyd"
+    fi
+    ;;
+  status)
+    status_of_proc /usr/sbin/acpi_fakekeyd "acpi_fakekey daemon" && exit 0 || exit $?
+    ;;
+  restart|force-reload)
+    log_action_begin_msg "Restarting acpi_fakekey daemon"
+    start-stop-daemon --stop --quiet --exec /usr/sbin/acpi_fakekeyd
+    if start-stop-daemon --start --quiet --exec /usr/sbin/acpi_fakekeyd
+    then
+	log_action_end_msg 0
+    else
+	log_action_end_msg 1 "Could not restart /usr/sbin/acpi_fakekeyd"
+    fi
+    ;;
+  *)
+  ;;
+esac
+        
+
--- acpi-support-0.142.orig/debian/acpi-fakekey.install
+++ acpi-support-0.142/debian/acpi-fakekey.install
@@ -0,0 +1,4 @@
+debian/addons/fakekey/acpi_fakekey		/usr/bin
+debian/addons/fakekey/acpi_fakekeyd		/usr/sbin
+debian/acpi-fakekey.service			/lib/systemd/system
+debian/acpi-fakekey.socket			/lib/systemd/system
--- acpi-support-0.142.orig/debian/acpi-fakekey.manpages
+++ acpi-support-0.142/debian/acpi-fakekey.manpages
@@ -0,0 +1 @@
+debian/acpi_fakekey.1
--- acpi-support-0.142.orig/debian/acpi-fakekey.postinst
+++ acpi-support-0.142/debian/acpi-fakekey.postinst
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+exit 0
--- acpi-support-0.142.orig/debian/acpi-fakekey.service
+++ acpi-support-0.142/debian/acpi-fakekey.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=ACPI fakekey daemon
+Requires=acpi-fakekey.socket
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/acpi_fakekeyd -f
--- acpi-support-0.142.orig/debian/acpi-fakekey.socket
+++ acpi-support-0.142/debian/acpi-fakekey.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=ACPI fakekey daemon FIFO
+
+[Socket]
+ListenFIFO=/var/run/acpi_fakekey
+SocketMode=0200
+
+[Install]
+WantedBy=sockets.target
--- acpi-support-0.142.orig/debian/acpi-support-base.dirs
+++ acpi-support-0.142/debian/acpi-support-base.dirs
@@ -0,0 +1,4 @@
+etc/acpi
+etc/acpi/events
+usr/share/acpi-support
+usr/share/doc/acpi-support-base
--- acpi-support-0.142.orig/debian/acpi-support-base.install
+++ acpi-support-0.142/debian/acpi-support-base.install
@@ -0,0 +1,5 @@
+debian/addons/scripts/powerbtn-acpi-support.sh	/etc/acpi
+debian/addons/events/powerbtn-acpi-support	/etc/acpi/events
+
+debian/addons/lib/policy-funcs			/usr/share/acpi-support
+debian/addons/lib/power-funcs			/usr/share/acpi-support
--- acpi-support-0.142.orig/debian/acpi-support-base.postinst
+++ acpi-support-0.142/debian/acpi-support-base.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+        configure)		
+                invoke-rc.d acpid restart >/dev/null || true
+                ;;
+        *)
+                ;;
+esac
+
+#DEBHELPER#
--- acpi-support-0.142.orig/debian/acpi-support.dirs
+++ acpi-support-0.142/debian/acpi-support.dirs
@@ -0,0 +1,7 @@
+etc/acpi
+etc/acpi/events
+etc/default
+etc/init.d
+usr/share/acpi-support
+usr/share/doc/acpi-support
+var/lib/acpi-support
--- acpi-support-0.142.orig/debian/acpi-support.docs
+++ acpi-support-0.142/debian/acpi-support.docs
@@ -0,0 +1,5 @@
+README
+README.toshiba
+debian/addons/docs/README.asus
+debian/addons/docs/README.thinkpad
+debian/examples
--- acpi-support-0.142.orig/debian/acpi-support.init
+++ acpi-support-0.142/debian/acpi-support.init
@@ -0,0 +1,55 @@
+#!/bin/sh
+# INIT script to check whether we're on batteries, and so start with laptop 
+# mode etc enabled.
+
+### BEGIN INIT INFO
+# Provides:          acpi-support
+# Required-Start:    $local_fs $remote_fs $syslog
+# Required-Stop:     $local_fs $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      1
+# Short-Description: Start some power management scripts
+### END INIT INFO
+
+test -f /usr/share/acpi-support/power-funcs || exit 0
+
+# BUGS: unless we start *really* late, we have no way of throttling 
+# xscreensaver, since it won't be there to command.
+. /usr/share/acpi-support/power-funcs
+
+test -f /lib/lsb/init-functions || exit 1
+. /lib/lsb/init-functions
+
+test -d /var/lib/acpi-support || exit 0
+
+case "$1" in
+  start)
+    log_action_begin_msg "Enabling power management"
+    on_ac_power
+    if [ $? -eq 1 ]; then 
+	/etc/acpi/power.sh true
+    fi
+    # Source everything in /etc/acpi/start.d/
+    for SCRIPT in /etc/acpi/start.d/*.sh; do
+	if [ -f "$SCRIPT" ] ; then
+  	  . "$SCRIPT"
+  	fi
+    done
+    log_action_end_msg 0
+    ;;
+  stop)
+    log_action_begin_msg "Disabling power management"
+    on_ac_power
+    if [ $? -eq 1 ]; then 
+	/etc/acpi/power.sh false
+    fi
+    log_action_end_msg 0
+    ;;
+  restart|force-reload|status)
+    # Doesn't make sense for this package
+    ;;
+  *)
+  ;;
+esac
+        
+
--- acpi-support-0.142.orig/debian/acpi-support.install
+++ acpi-support-0.142/debian/acpi-support.install
@@ -0,0 +1,53 @@
+asus-keyboard-backlight.sh			/etc/acpi
+asus-wireless.sh				/etc/acpi
+ibm-wireless.sh					/etc/acpi
+tosh-wireless.sh				/etc/acpi
+undock.sh					/etc/acpi
+
+debian/addons/scripts/always-mute.sh		/etc/acpi
+debian/addons/scripts/ejectbtn.sh		/etc/acpi
+debian/addons/scripts/lid.sh			/etc/acpi
+debian/addons/scripts/mutebtn.sh		/etc/acpi
+debian/addons/scripts/power.sh			/etc/acpi
+debian/addons/scripts/sleep_suspend.sh		/etc/acpi
+debian/addons/scripts/sleep_suspendbtn.sh	/etc/acpi
+debian/addons/scripts/sonybright.sh		/etc/acpi
+debian/addons/scripts/voldownbtn.sh		/etc/acpi
+debian/addons/scripts/volupbtn.sh		/etc/acpi
+
+events/asus-keyboard-backlight-down		/etc/acpi/events
+events/asus-keyboard-backlight-up		/etc/acpi/events
+events/asus-wireless-off			/etc/acpi/events
+events/asus-wireless-on				/etc/acpi/events
+events/ibm-wireless				/etc/acpi/events
+events/lenovo-undock				/etc/acpi/events
+events/thinkpad-cmos				/etc/acpi/events
+events/tosh-wireless				/etc/acpi/events
+
+debian/addons/events/ac			  	/etc/acpi/events
+debian/addons/events/asus-media-eject	  	/etc/acpi/events
+debian/addons/events/asus-wireless-wlan  	/etc/acpi/events
+debian/addons/events/battery			/etc/acpi/events
+debian/addons/events/lidbtn			/etc/acpi/events
+debian/addons/events/sleepbtn			/etc/acpi/events
+debian/addons/events/sony-brightness-down	/etc/acpi/events
+debian/addons/events/sony-brightness-up		/etc/acpi/events
+debian/addons/events/sony-eject			/etc/acpi/events
+debian/addons/events/sony-mute			/etc/acpi/events
+debian/addons/events/sony-sleep			/etc/acpi/events
+debian/addons/events/sony-volume-down		/etc/acpi/events
+debian/addons/events/sony-volume-up		/etc/acpi/events
+debian/addons/events/suspendbtn			/etc/acpi/events
+debian/addons/events/thinkpad-mute		/etc/acpi/events
+debian/addons/events/thinkpad-volume-down	/etc/acpi/events
+debian/addons/events/thinkpad-volume-up		/etc/acpi/events
+debian/addons/events/thinkpad-wireless-wlan  	/etc/acpi/events
+
+key-constants					/usr/share/acpi-support
+lib/state-funcs					/usr/share/acpi-support
+debian/addons/lib/screenblank			/usr/share/acpi-support
+
+debian/addons/default/acpi-support		/etc/default
+
+debian/lintian/acpi-support			/usr/share/lintian/overrides
+
--- acpi-support-0.142.orig/debian/acpi-support.postinst
+++ acpi-support-0.142/debian/acpi-support.postinst
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+        configure)
+                invoke-rc.d --quiet acpid restart > /dev/null || true
+                ;;
+        *)
+                ;;
+esac
+
+# Remove shutdown and reboot links; this init script does not need them.
+if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.86"; then
+	rm -f /etc/rc0.d/K20acpi-support /etc/rc6.d/K20acpi-support
+fi
+
+# vbesave got removed
+if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.122-1"; then
+	update-rc.d vbesave remove >/dev/null || exit $?
+fi
+
+#DEBHELPER#
--- acpi-support-0.142.orig/debian/acpi-support.postrm
+++ acpi-support-0.142/debian/acpi-support.postrm
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" = "purge" ] ; then
+	rm -f /etc/acpi/resume.d/13-855-resolution-set.sh.obsolete
+	rm -f /etc/acpi/resume.d/49-855-resolution-set.sh.obsolete
+	rm -f /etc/modprobe.d/ibm_acpi.modprobe
+fi
+
--- acpi-support-0.142.orig/debian/acpi-support.preinst
+++ acpi-support-0.142/debian/acpi-support.preinst
@@ -0,0 +1,253 @@
+#!/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.obsolete ..."
+            mv -f "$CONFFILE" "$CONFFILE".obsolete
+        else
+	    echo "Removing obsolete conffile $CONFFILE ..."
+	    rm -f "$CONFFILE"
+        fi
+    fi
+}
+
+case "$1" in
+  install|upgrade)
+    if dpkg --compare-versions "$2" lt 0.95-1; then
+	rm_conffile acpi-support /etc/acpi/suspend.d/80-video-pci-state.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/49-855-resolution-set.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/13-855-resolution-set.sh
+	rm_conffile acpi-support /etc/modprobe.d/toshiba_acpi.modprobe
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.114-2; then
+	rm_conffile acpi-support /etc/acpi/resume.d/13-915-resolution-set.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/49-915-resolution-set.sh
+	rm_conffile acpi-support /etc/modprobe.d/ibm_acpi.modprobe
+	rm_conffile acpi-support /etc/modprobe.d/thinkpad_acpi.modprobe
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.122-2; then
+	# old files that were actually removed in 0.121-1
+	rm_conffile acpi-support /etc/acpi/thinkpad-lockorbattery.sh
+	rm_conffile acpi-support /etc/acpi/thinkpad-thinklight.sh
+	rm_conffile acpi-support /etc/acpi/toshbright.sh
+	rm_conffile acpi-support /etc/acpi/thinkpad-brightness-up.sh
+	rm_conffile acpi-support /etc/acpi/thinkpad-brightness-down.sh
+	rm_conffile acpi-support /etc/acpi/thinkpad-zoom.sh
+
+	rm_conffile acpi-support /etc/acpi/events/asus-mail
+	rm_conffile acpi-support /etc/acpi/events/ibm-sleepbtn
+	rm_conffile acpi-support /etc/acpi/events/ibm-lockbtn
+	rm_conffile acpi-support /etc/acpi/events/ibm-hibernatebtn
+	rm_conffile acpi-support /etc/acpi/events/lenovo-lockbtn
+	rm_conffile acpi-support /etc/acpi/events/ibm-videobtn
+	rm_conffile acpi-support /etc/acpi/events/thinkpad-thinklight
+	rm_conffile acpi-support /etc/acpi/events/tosh-brightness-up
+	rm_conffile acpi-support /etc/acpi/events/tosh-brightness-down
+	rm_conffile acpi-support /etc/acpi/events/tosh-mute
+	rm_conffile acpi-support /etc/acpi/events/tosh-sleep
+	rm_conffile acpi-support /etc/acpi/events/sony-hibernate
+	rm_conffile acpi-support /etc/acpi/events/thinkpad-brightness-up
+	rm_conffile acpi-support /etc/acpi/events/thinkpad-brightness-down
+	rm_conffile acpi-support /etc/acpi/events/thinkpad-zoom
+
+	# in 0.122-1 we removed the whole suspend/resume stuff
+	rm_conffile acpi-support /etc/acpi/resume.d/11-video-pci-restore.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/13-855-resolution-set.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/15-video-post.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/17-video-restore.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/35-modules-load.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/40-infra-red.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/49-855-resolution-set.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/50-framebuffer-enable.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/50-time.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/50-tosh-restore-brightness.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/55-screen.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/58-proc-sysfs-restore-state.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/60-asus-wireless-led.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/62-ifup.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/65-console.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/67-sound.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/69-services.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/72-acpi-pain.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/89-asus-restore-brightness.sh
+
+	[ -L /etc/acpi/resume.d/90-hdparm.sh ] && rm -f /etc/acpi/resume.d/90-hdparm.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/90-hdparm.sh
+
+	rm_conffile acpi-support /etc/acpi/resume.d/90-thinkpad-unstandby-led.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/90-xscreensaver.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/95-laptop-mode.sh
+	rm_conffile acpi-support /etc/acpi/resume.d/98-acpi-unlock.sh
+
+	rm_conffile acpi-support /etc/acpi/suspend.d/01-laptop-mode.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/05-acpi-lock.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/10-thinkpad-standby-led.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/30-proc-sysfs-save-state.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/50-irda-stop.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/50-time.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/50-tosh-save-brightness.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/55-down-interfaces.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/60-generate-modules-list.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/65-services-stop.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/70-modules-unload.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/75-console-switch.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/80-video-vesa-state.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/81-video-pci-state.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/85-alsa-state.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/88-time.sh
+	rm_conffile acpi-support /etc/acpi/suspend.d/90-framebuffer-stop.sh
+
+	rm_conffile acpi-support /etc/acpi/prepare.sh
+	rm_conffile acpi-support /etc/acpi/resume.sh
+
+	rm_conffile acpi-support /etc/init.d/vbesave
+
+	# Also remove the symlinks
+	[ -L /etc/acpi/resume.d/10-thinkpad-standby-led.sh ] && rm -f /etc/acpi/resume.d/10-thinkpad-standby-led.sh
+
+	# These used to be a symlink, but are a real files now.
+	[ -L /etc/acpi/start.d/60-asus-wireless-led.sh ] && rm -f /etc/acpi/start.d/60-asus-wireless-led.sh
+	[ -L /etc/acpi/start.d/90-hdparm.sh ] && rm -f /etc/acpi/start.d/90-hdparm.sh 
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.123-1; then
+	rm_conffile acpi-support /etc/acpi/events/asus-volume-down
+	rm_conffile acpi-support /etc/acpi/events/asus-volume-mute
+	rm_conffile acpi-support /etc/acpi/events/asus-volume-up
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.129-1; then
+	rm_conffile acpi-support /etc/acpi/panabright.sh
+	rm_conffile acpi-support /etc/acpi/panapower.sh
+	rm_conffile acpi-support /etc/acpi/thinkpad-thinkpad.sh
+	rm_conffile acpi-support /etc/acpi/video_brightnessdown.sh
+	rm_conffile acpi-support /etc/acpi/video_brightnessup.sh
+	rm_conffile acpi-support /etc/acpi/wireless.sh
+	rm_conffile acpi-support /etc/acpi/events/video_brightnessdown
+	rm_conffile acpi-support /etc/acpi/events/video_brightnessup
+	rm_conffile acpi-support /etc/acpi/events/asus-a6u-touchpad
+	rm_conffile acpi-support /etc/acpi/events/asus-internet
+	rm_conffile acpi-support /etc/acpi/events/asus-lock
+	rm_conffile acpi-support /etc/acpi/events/asus-wireless
+	rm_conffile acpi-support /etc/acpi/events/asus-media-next
+	rm_conffile acpi-support /etc/acpi/events/asus-media-play-pause
+	rm_conffile acpi-support /etc/acpi/events/asus-media-prev
+	rm_conffile acpi-support /etc/acpi/events/asus-media-stop
+	rm_conffile acpi-support /etc/acpi/events/panasonic-brightness-down
+	rm_conffile acpi-support /etc/acpi/events/panasonic-brightness-up
+	rm_conffile acpi-support /etc/acpi/events/panasonic-mute
+	rm_conffile acpi-support /etc/acpi/events/panasonic-volume-down
+	rm_conffile acpi-support /etc/acpi/events/panasonic-volume-up
+	rm_conffile acpi-support /etc/acpi/events/thinkpad-thinkpad
+	rm_conffile acpi-support /etc/acpi/events/video_brightnessdown
+	rm_conffile acpi-support /etc/acpi/events/video_brightnessup
+
+	[ -L /etc/acpi/ac.d/90-hdparm.sh ] && rm -f /etc/acpi/ac.d/90-hdparm.sh
+	rm_conffile acpi-support /etc/acpi/ac.d/90-hdparm.sh
+	[ -L /etc/acpi/battery.d/90-hdparm.sh ] && rm -f /etc/acpi/battery.d/90-hdparm.sh
+	rm_conffile acpi-support /etc/acpi/battery.d/90-hdparm.sh
+	[ -L /etc/acpi/start.d/90-hdparm.sh ] && rm -f /etc/acpi/start.d/90-hdparm.sh
+	rm_conffile acpi-support /etc/acpi/start.d/90-hdparm.sh
+
+	[ -d /etc/acpi/ac.d ] && rmdir --ignore-fail-on-non-empty /etc/acpi/ac.d 
+	[ -d /etc/acpi/battery.d ] && rmdir --ignore-fail-on-non-empty /etc/acpi/battery.d
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.129-2; then
+	rm_conffile acpi-support /etc/acpi/events/videobtn
+
+	# This was actually forgotton long ago, so we remove it now.
+	rm_conffile acpi-support /etc/acpi/resume.d/10-thinkpad-standby-led.sh
+
+	[ -d /etc/acpi/resume.d ] && rmdir --ignore-fail-on-non-empty /etc/acpi/resume.d 
+	[ -d /etc/acpi/suspend.d ] && rmdir --ignore-fail-on-non-empty /etc/acpi/suspend.d
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.131-1; then
+	# Just another one that was forgotten.
+	rm_conffile acpi-support /etc/acpi/start.d/10-save-dmidecode.sh
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.131-3; then
+	rm_conffile acpi-support /etc/acpi/start.d/60-asus-wireless-led.sh
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.132-1; then
+	rm_conffile acpi-support /etc/acpi/asus-wireless-2.sh
+	rm_conffile acpi-support /etc/acpi/events/asus-wireless-2
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.137-1; then
+	rm_conffile acpi-support /etc/acpi/events/asus-eee-volume-down
+	rm_conffile acpi-support /etc/acpi/events/asus-eee-volume-mute
+	rm_conffile acpi-support /etc/acpi/events/asus-eee-volume-up
+	rm_conffile acpi-support /etc/acpi/events/panasonic-hibernatebtn
+	rm_conffile acpi-support /etc/acpi/events/panasonic-sleepbtn
+	rm_conffile acpi-support /etc/acpi/if-asus-eee.sh
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.140-3; then
+	rm_conffile acpi-support /etc/acpi/hibernatebtn.sh
+	rm_conffile acpi-support /etc/acpi/sleep.sh
+	rm_conffile acpi-support /etc/acpi/hibernate.sh
+	rm_conffile acpi-support /etc/acpi/sleepbtn.sh
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.141-1; then
+	rm_conffile acpi-support /etc/acpi/if-asus-not-eee.sh
+    fi
+
+    if dpkg --compare-versions "$2" lt 0.142-1; then
+	rm_conffile acpi-support /etc/acpi/asus-brn-down.sh
+	rm_conffile acpi-support /etc/acpi/asus-brn-up.sh
+	rm_conffile acpi-support /etc/acpi/asus-touchpad.sh
+	rm_conffile acpi-support /etc/acpi/batterybtn.sh
+	rm_conffile acpi-support /etc/acpi/events/asus-f8sv-touchpad
+	rm_conffile acpi-support /etc/acpi/events/asus-rotate
+	rm_conffile acpi-support /etc/acpi/events/asus-touchpad
+	rm_conffile acpi-support /etc/acpi/events/asus-video
+	rm_conffile acpi-support /etc/acpi/events/asus-brightness-down
+	rm_conffile acpi-support /etc/acpi/events/asus-brightness-up
+	rm_conffile acpi-support /etc/acpi/events/lenovo-touchpad
+	rm_conffile acpi-support /etc/acpi/events/panasonic-lockbtn
+	rm_conffile acpi-support /etc/acpi/events/tosh-battery
+	rm_conffile acpi-support /etc/acpi/events/tosh-hibernate
+	rm_conffile acpi-support /etc/acpi/events/tosh-ibutton
+	rm_conffile acpi-support /etc/acpi/events/tosh-lock
+	rm_conffile acpi-support /etc/acpi/events/tosh-mail
+	rm_conffile acpi-support /etc/acpi/events/tosh-media
+	rm_conffile acpi-support /etc/acpi/events/tosh-next
+	rm_conffile acpi-support /etc/acpi/events/tosh-play
+	rm_conffile acpi-support /etc/acpi/events/tosh-prev
+	rm_conffile acpi-support /etc/acpi/events/tosh-stop
+	rm_conffile acpi-support /etc/acpi/events/tosh-www
+	rm_conffile acpi-support /etc/acpi/lockbtn.sh
+	rm_conffile acpi-support /etc/acpi/mailbtn.sh
+	rm_conffile acpi-support /etc/acpi/mediabtn.sh
+	rm_conffile acpi-support /etc/acpi/nextbtn.sh
+	rm_conffile acpi-support /etc/acpi/playbtn.sh
+	rm_conffile acpi-support /etc/acpi/prevbtn.sh
+	rm_conffile acpi-support /etc/acpi/rotatescreen.sh
+	rm_conffile acpi-support /etc/acpi/screenblank.sh
+	rm_conffile acpi-support /etc/acpi/stopbtn.sh
+	rm_conffile acpi-support /etc/acpi/thinkpad-stretchortouchpad.sh
+	rm_conffile acpi-support /etc/acpi/videobtn.sh
+	rm_conffile acpi-support /etc/acpi/webbtn.sh
+    fi
+  ;;
+esac
+
+exit 0
--- acpi-support-0.142.orig/debian/acpi_fakekey.1
+++ acpi-support-0.142/debian/acpi_fakekey.1
@@ -0,0 +1,21 @@
+.Dd 2007-01-22
+.Dt acpi_fakekey 1
+.Os "Debian GNU/Linux"
+.Sh NAME
+.Nm acpi_fakekey
+.Nd acpi event wrapper
+.Sh SYNOPSIS
+.Nm acpi_fakekey
+.Op KEYNUMBER
+.Sh DESCRIPTION
+.Nm
+gets the key numbers for specific events generated as output by
+scripts in /etc/acpi/ and writes them to the correct input FIFO in /dev/input/eventx.
+.Sh OPTIONS
+No options used by this program.
+.Sh SEE ALSO
+.Xr acpid 8
+.Xr acpi_listen 8
+.Sh AUTHOR
+This manual page was written by Nico Golde <nico@ngolde.de>
+for the Debian GNU/Linux system (but may be used by others).
--- acpi-support-0.142.orig/debian/addons/build/aliased-keys
+++ acpi-support-0.142/debian/addons/build/aliased-keys
@@ -0,0 +1,7 @@
+KEY_LOCK=$KEY_COFFEE
+KEY_LIGHT=$KEY_F19
+KEY_VIDEOOUT=$KEY_F20
+KEY_ROTATESCREEN=$KEY_F21
+KEY_VIDEOMODECYCLE=$KEY_F22
+KEY_PRESENTATION=$KEY_F23
+KEY_BATTERY=236
--- acpi-support-0.142.orig/debian/addons/default/acpi-support
+++ acpi-support-0.142/debian/addons/default/acpi-support
@@ -0,0 +1,64 @@
+#
+# Configuration file for the acpi-support package
+#
+#
+# The acpi-support package is intended as "glue" to make special functions of
+# laptops work. Specifically, it translates special function keys for some
+# laptop models into actions or generic function key presses.
+#
+
+
+#
+# Suspend/hibernate method
+# ------------------------
+#
+# When gnome or kde power management daemons are running, acpi-support will
+# translate the suspend and hibernate keys of laptops into special "suspend"
+# and "hibernate" keys that these daemons handle.
+#
+# Only in situations where there is no power management daemon
+# running, acpi-support needs to perform suspend/hibernate in some other way.
+# Beginning with version 0.122-1 acpi-support solely uses pm-utils then.
+
+# Comment the next line to disable ACPI suspend to RAM
+ACPI_SLEEP=true
+
+# Comment the next line to disable suspend to disk
+ACPI_HIBERNATE=true
+
+# Use Radeontool to switch the screen off? Seems to be needed on some machines
+# RADEON_LIGHT=true
+
+# Comment this out to disable screen locking on resume
+LOCK_SCREEN=true
+
+# Uncomment this to enable ACPI sleep when the lid screen is closed.
+#LID_SLEEP=true
+
+# Uncomment this to shutdown the system if ACPI sleep has not been possible
+# upon lid closure. Has no effect if LID_SLEEP is not set.
+#LID_SHUTDOWN=true
+
+# On some systems pressing the wireless button only results in an event that we
+# handle, but not in some hardware enforced action. On these systems we are
+# free to choose whether or not we cycle through "Both on, Both off, Wireless
+# only, Bluetooth only" as we used to do, or if we just do "Both on, Both off"
+# as the hardware kill switch does on most systems.
+#
+# For compatibility reasons with older version the larger cycle is the default.
+# Enable this to to have both in switched on and off simultaniously. 
+#WIRELESS_BLUETOOTH_SYNC=true
+
+# Choose the method used to switch off/on the display. Available options are
+# "xset", "xrandr" and "vbetool".
+DISPLAY_DPMS=xset
+
+# xrandr needs the output device to be named
+XRANDR_OUTPUT=LVDS
+
+# vbetool can switch off/on the display even if no user is logged in. However,
+# there are systems that do not reset the display when coming out of suspend,
+# so that the screen remains dark. Unable this option to switch off the display
+# even if no one is logged in.
+#DISPLAY_DPMS_NO_USER=true
+
--- acpi-support-0.142.orig/debian/addons/docs/README.asus
+++ acpi-support-0.142/debian/addons/docs/README.asus
@@ -0,0 +1,8 @@
+TouchPad
+^^^^^^^^
+
+The asus-touchpad.sh scripts uses xinput to toggle the touchpad device. That's
+why the xinput package is suggested by acpi-support. Please make sure xinput is
+installed if you experience any problems with touchpad toggling.
+
+Michael Meskes <meskes@debian.org>
--- acpi-support-0.142.orig/debian/addons/docs/README.thinkpad
+++ acpi-support-0.142/debian/addons/docs/README.thinkpad
@@ -0,0 +1,20 @@
+Volume keys
+^^^^^^^^^^^
+
+On most Thinkpads with a fairly recent kernel (tested from 2.6.30 upwards) the
+volume keys are correctly handled by the kernel input layer. However, there are
+some reports from systems on which they are not, but instead these keys still
+generate ibm/hotkey events. Translation of these hotkey events is done by
+acpi-support for the time being. If the keys are handled correctly by the
+kernel the translation is not triggered so no harm is done.
+
+If you experience any problem with the volume keys on a Thinkpad please tell us.
+
+Wireless
+^^^^^^^^
+
+The ibm-wireless.sh scripts uses rfkill to toggle wireless. That's why the
+rfkill package is suggested by acpi-support. Please make sure rfkill is
+installed if you experience any problems with wireless toggling.
+
+Michael Meskes <meskes@debian.org>
--- acpi-support-0.142.orig/debian/addons/events/ac
+++ acpi-support-0.142/debian/addons/events/ac
@@ -0,0 +1,6 @@
+# /etc/acpi/events/ac
+# Called when the user connects ac power to us
+# 
+
+event=ac_adapter.*
+action=/etc/acpi/power.sh
--- acpi-support-0.142.orig/debian/addons/events/asus-keys-down
+++ acpi-support-0.142/debian/addons/events/asus-keys-down
@@ -0,0 +1,7 @@
+# /etc/acpi/events/asus-keys-down
+# This is called when the user presses the key brightness 
+# down button and calls /etc/acpi/asus-keys-down.sh for
+# further processing.
+
+event=hotkey ATKD 000000c5
+action=/etc/acpi/asus-keys-down.sh
--- acpi-support-0.142.orig/debian/addons/events/asus-keys-up
+++ acpi-support-0.142/debian/addons/events/asus-keys-up
@@ -0,0 +1,7 @@
+# /etc/acpi/events/asus-keys-up
+# This is called when the user presses the key brightness 
+# up button and calls /etc/acpi/asus-keys-up.sh for
+# further processing.
+
+event=hotkey ATKD 000000c4
+action=/etc/acpi/asus-keys-up.sh
--- acpi-support-0.142.orig/debian/addons/events/asus-media-eject
+++ acpi-support-0.142/debian/addons/events/asus-media-eject
@@ -0,0 +1,6 @@
+# /etc/acpi/events/asus-media-eject
+# This is called when the user presses the eject media button and calls
+# /etc/acpi/media.sh for further processing.
+
+event=hotkey (ATKD|HOTK) 0000004c
+action=/etc/acpi/ejectbtn.sh
--- acpi-support-0.142.orig/debian/addons/events/asus-wireless-wlan
+++ acpi-support-0.142/debian/addons/events/asus-wireless-wlan
@@ -0,0 +1,2 @@
+event=button/wlan WLAN 00000080
+action=/etc/acpi/asus-wireless.sh
--- acpi-support-0.142.orig/debian/addons/events/battery
+++ acpi-support-0.142/debian/addons/events/battery
@@ -0,0 +1,5 @@
+# /etc/acpi/events/battery
+# Called when AC power goes away and we switch to battery
+
+event=battery.*
+action=/etc/acpi/power.sh
--- acpi-support-0.142.orig/debian/addons/events/lidbtn
+++ acpi-support-0.142/debian/addons/events/lidbtn
@@ -0,0 +1,5 @@
+# /etc/acpi/events/lidbtn
+# Called when the user closes or opens the lid
+
+event=button[ /]lid
+action=/etc/acpi/lid.sh
--- acpi-support-0.142.orig/debian/addons/events/powerbtn-acpi-support
+++ acpi-support-0.142/debian/addons/events/powerbtn-acpi-support
@@ -0,0 +1,2 @@
+event=button[ /]power
+action=/etc/acpi/powerbtn-acpi-support.sh
--- acpi-support-0.142.orig/debian/addons/events/sleepbtn
+++ acpi-support-0.142/debian/addons/events/sleepbtn
@@ -0,0 +1,10 @@
+# /etc/acpi/events/sleepbtn
+# Called when the user presses the sleep button
+
+# Note that this script is part of the SUSPEND part of acpi-support. This is
+# not a key translation event, it is intended to perform a suspend if no
+# power management daemon is running.
+
+event=button[ /]sleep
+action=/etc/acpi/sleep_suspend.sh sleep
+
--- acpi-support-0.142.orig/debian/addons/events/sony-brightness-down
+++ acpi-support-0.142/debian/addons/events/sony-brightness-down
@@ -0,0 +1,4 @@
+# /etc/acpi/events/sony-brightness-down
+
+event=sony/hotkey (SPIC|SNC) 00000001 00000010
+action=/etc/acpi/sonybright.sh down
--- acpi-support-0.142.orig/debian/addons/events/sony-brightness-up
+++ acpi-support-0.142/debian/addons/events/sony-brightness-up
@@ -0,0 +1,4 @@
+# /etc/acpi/events/sony-brightness-up
+
+event=sony/hotkey (SPIC|SNC) 00000001 00000011
+action=/etc/acpi/sonybright.sh up
--- acpi-support-0.142.orig/debian/addons/events/sony-eject
+++ acpi-support-0.142/debian/addons/events/sony-eject
@@ -0,0 +1,4 @@
+# Eject button on Sony Vaio TX3
+
+event=sony/hotkey (SPIC|SNC) 00000001 0000001b
+action=/etc/acpi/ejectbtn.sh
--- acpi-support-0.142.orig/debian/addons/events/sony-mute
+++ acpi-support-0.142/debian/addons/events/sony-mute
@@ -0,0 +1,4 @@
+# /etc/acpi/events/sony-mute
+
+event=sony/hotkey (SPIC|SNC) 00000001 0000000d
+action=/etc/acpi/mutebtn.sh
--- acpi-support-0.142.orig/debian/addons/events/sony-sleep
+++ acpi-support-0.142/debian/addons/events/sony-sleep
@@ -0,0 +1,4 @@
+# /etc/acpi/events/sony-sleep
+
+event=sony/hotkey (SPIC|SNC) 00000001 0000000b
+action=/etc/acpi/sleep_suspendbtn.sh sleep
--- acpi-support-0.142.orig/debian/addons/events/sony-volume-down
+++ acpi-support-0.142/debian/addons/events/sony-volume-down
@@ -0,0 +1,4 @@
+# /etc/acpi/events/sony-volume-down
+
+event=sony/hotkey (SPIC|SNC) 00000001 0000000e
+action=/etc/acpi/voldownbtn.sh
--- acpi-support-0.142.orig/debian/addons/events/sony-volume-up
+++ acpi-support-0.142/debian/addons/events/sony-volume-up
@@ -0,0 +1,4 @@
+# /etc/acpi/events/sony-volume-up
+
+event=sony/hotkey (SPIC|SNC) 00000001 0000000f
+action=/etc/acpi/volupbtn.sh
--- acpi-support-0.142.orig/debian/addons/events/suspendbtn
+++ acpi-support-0.142/debian/addons/events/suspendbtn
@@ -0,0 +1,10 @@
+# /etc/acpi/events/suspendbtn
+# Called when the user presses the suspend button
+
+# Note that this script is part of the SUSPEND part of acpi-support. This is
+# not a key translation event, it is intended to perform a hibernate if no
+# power management daemon is running.
+
+event=button[ /]suspend
+action=/etc/acpi/sleep_suspend.sh suspend
+
--- acpi-support-0.142.orig/debian/addons/events/thinkpad-mute
+++ acpi-support-0.142/debian/addons/events/thinkpad-mute
@@ -0,0 +1,3 @@
+# Volume Always Mute
+event=ibm/hotkey HKEY 00000080 00001017
+action=/etc/acpi/always-mute.sh
--- acpi-support-0.142.orig/debian/addons/events/thinkpad-volume-down
+++ acpi-support-0.142/debian/addons/events/thinkpad-volume-down
@@ -0,0 +1,3 @@
+# Volume Down
+event=ibm/hotkey HKEY 00000080 00001016
+action=/etc/acpi/voldownbtn.sh 
--- acpi-support-0.142.orig/debian/addons/events/thinkpad-volume-up
+++ acpi-support-0.142/debian/addons/events/thinkpad-volume-up
@@ -0,0 +1,3 @@
+# Volume Up
+event=ibm/hotkey HKEY 00000080 00001015
+action=/etc/acpi/volupbtn.sh
--- acpi-support-0.142.orig/debian/addons/events/thinkpad-wireless-wlan
+++ acpi-support-0.142/debian/addons/events/thinkpad-wireless-wlan
@@ -0,0 +1,2 @@
+event=button/wlan WLAN 00000080
+action=/etc/acpi/asus-wireless.sh
--- acpi-support-0.142.orig/debian/addons/fakekey/Makefile
+++ acpi-support-0.142/debian/addons/fakekey/Makefile
@@ -0,0 +1,10 @@
+all: acpi_fakekey acpi_fakekeyd
+
+acpi_fakekey: acpi_fakekey.c
+	gcc -Wall $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get LDFLAGS) -o $@ $<
+
+acpi_fakekeyd: acpi_fakekeyd.c
+	gcc -Wall $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get LDFLAGS) $(shell pkg-config --cflags --libs libsystemd-daemon) -o $@ $<
+
+clean:
+	$(RM) acpi_fakekey acpi_fakekeyd
--- acpi-support-0.142.orig/debian/addons/fakekey/acpi_fakekey.c
+++ acpi-support-0.142/debian/addons/fakekey/acpi_fakekey.c
@@ -0,0 +1,29 @@
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#define FIFO "/var/run/acpi_fakekey"
+
+int main(int argc, char** argv) {
+	int fd;
+	unsigned char key;
+
+	if (argc != 2) {
+		printf("Usage: %s <key>\n", argv[0]);
+		return EXIT_FAILURE;
+	}
+	key = atoi(argv[1]);
+
+	if ((fd = open(FIFO, O_WRONLY)) == -1) {
+		perror("fifo");
+		return EXIT_FAILURE;
+	}
+	if (write(fd, &key, 1) == -1) {
+		perror("write");
+		return EXIT_FAILURE;
+	}
+
+	close(fd);
+	return EXIT_SUCCESS;
+}
--- acpi-support-0.142.orig/debian/addons/fakekey/acpi_fakekeyd.c
+++ acpi-support-0.142/debian/addons/fakekey/acpi_fakekeyd.c
@@ -0,0 +1,137 @@
+#define _BSD_SOURCE
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <linux/uinput.h>
+#include <sys/stat.h>
+#include <systemd/sd-daemon.h>
+
+#define FIFO "/var/run/acpi_fakekey"
+
+static void fail(const char *str) {
+	perror(str);
+	exit(EXIT_FAILURE);
+}
+
+
+static int create_fifo() {
+	int fifo, n;
+
+	n = sd_listen_fds(1);
+	if (n > 1)
+		fail("sd_listen_fds");
+	else if (n == 1) {
+		fifo = SD_LISTEN_FDS_START + 0;
+		if (!sd_is_fifo(fifo, FIFO))
+			fail("sd_is_fifo");
+	} else {
+		remove(FIFO);
+		if (mkfifo(FIFO, 0200) == -1)
+			fail("mkfifo");
+		if ((fifo = open(FIFO, O_RDWR | O_NONBLOCK)) == -1)
+			fail("open fifo");
+	}
+
+	return fifo;
+}
+
+static int create_uinputdev() {
+	int udev, i;
+	struct uinput_user_dev dev;
+
+	/* Failure to open dev is not fatal, module might be loaded later */
+	udev = open("/dev/uinput", O_WRONLY | O_NDELAY);
+	if (udev < 0) {
+		perror("failed to open /dev/uinput");
+		return -1;
+	}
+
+	memset(&dev, 0, sizeof(dev));
+	strncpy(dev.name, "ACPI Virtual Keyboard Device", UINPUT_MAX_NAME_SIZE);
+	dev.id.version = 4;
+	dev.id.bustype = BUS_USB;
+
+	ioctl(udev, UI_SET_EVBIT, EV_KEY);
+	for (i = 0; i < 256; i++)
+		ioctl(udev, UI_SET_KEYBIT, i);
+
+	if (write(udev, &dev, sizeof(dev)) == -1)
+		fail("write");
+
+	if (ioctl(udev, UI_DEV_CREATE) == -1)
+		fail("create device");
+
+	return udev;
+}
+
+int main(int argc, char **argv) {
+	int do_daemonize = 1;
+	int udev;
+	int fifo;
+	fd_set sfd;
+
+	if (argc == 2 && !strcmp(argv[1], "-f"))
+		do_daemonize = 0;
+	else if (argc > 1)
+		fail("invalid arguments");
+
+	udev = create_uinputdev();
+
+	fifo = create_fifo();
+
+	if (do_daemonize && (daemon(0, 0) != 0))
+		fail("daemon");
+
+	FD_ZERO(&sfd);
+	FD_SET(fifo, &sfd);
+	while (select(fifo + 1, &sfd, 0, 0, 0) != -1) {
+		int n;
+		unsigned char key;
+		struct input_event event;
+
+		n = read(fifo, &key, 1);
+		if (n < 0)
+			break;
+		if (n == 0)
+			continue;
+
+		/* Try again to create a uinput device if necessary */
+		if (udev < 0) {
+			udev = create_uinputdev();
+			if (udev < 0)
+				continue;
+		}
+
+		/* Key pressed */
+		memset(&event, 0, sizeof(event));
+		event.type = EV_KEY;
+		event.code = key;
+		event.value = 1;
+		if (write(udev, &event, sizeof(event)) == -1)
+			break;
+
+		/* Key released */
+		memset(&event, 0, sizeof(event));
+		event.type = EV_KEY;
+		event.code = key;
+		event.value = 0;
+		if (write(udev, &event, sizeof(event)) == -1)
+			break;
+
+		/* Sync */
+		memset(&event, 0, sizeof(event));
+		event.type = EV_SYN;
+		event.code = SYN_REPORT;
+		event.value = 0;
+		if (write(udev, &event, sizeof(event)) == -1)
+			break;
+	}
+
+	ioctl(udev, UI_DEV_DESTROY);
+	close(udev);
+	close(fifo);
+	remove(FIFO);
+	return EXIT_FAILURE;
+}
--- acpi-support-0.142.orig/debian/addons/lib/policy-funcs
+++ acpi-support-0.142/debian/addons/lib/policy-funcs
@@ -0,0 +1,78 @@
+. /usr/share/acpi-support/power-funcs
+
+CheckUPowerPolicy() {
+	pidof upowerd > /dev/null
+}
+
+# The (not very aptly named) function CheckPolicy checks if the current X
+# console user is running a power management daemon that handles suspend/resume
+# requests. This is used in various places to determine if we need to handle
+# something ourselves or if we need to pass the info on to a power management
+# daemon (e.g. through a fake key press).
+
+CheckPolicy() {
+	local PMS
+
+	getXconsole
+	PMS="/usr/bin/xfce4-power-manager /usr/bin/mate-power-manager /usr/lib/dalston/dalston-power-applet"
+	pidof -x $PMS > /dev/null ||
+        HasLogindAndSystemd1Manager ||
+        PowerDevilRunning ||
+	GnomeSettingsDaemonPowerRunning
+}
+
+# Find a DBUS session bus, by looking at the given process' environment and
+# then send a message to that bus. If multiple processes match the given name,
+# the message is sent to all of the buses (and output is simply concatenated.
+DBusSend() {
+	# The process to get the DBUS session address from
+	local PROC_NAME="$1"
+
+	# Parameters for dbus-send
+	local DEST="$2"
+	local DBUS_PATH="$3"
+	local METHOD="$4"
+
+	local DBUS_SESS	
+	getXuser
+	if test "$XUSER" != "" && test -x /usr/bin/dbus-send; then
+		serverpid=$(pgrep -n -u "$XUSER" "$PROC_NAME")
+		if test "$serverpid" != ""; then
+			DBUS_SESS=$(su - "$XUSER" -c "grep -a -z DBUS_SESSION_BUS_ADDRESS /proc/$serverpid/environ || :")
+			if test "$DBUS_SESS" != "" && su - "$XUSER" -s /bin/sh -c "export \"$DBUS_SESS\"; dbus-send --print-reply --dest='$DEST' '$DBUS_PATH' '$METHOD'"; then
+				return 0
+			fi
+		fi
+	fi
+}
+
+# Check if systemd-logind will be able to call org.freedesktop.systemd1.Manager
+# interface provided by systemd running as PID 1 or by systemd-shim
+HasLogindAndSystemd1Manager() {
+  pidof -x "/lib/systemd/systemd-logind" > /dev/null &&
+  # shutdown.target used as a representative of power management calls class
+  dbus-send --print-reply --system --type=method_call \
+    --dest=org.freedesktop.systemd1 \
+    /org/freedesktop/systemd1 \
+    org.freedesktop.systemd1.Manager.GetUnitFileState string:shutdown.target \
+    > /dev/null 2>&1
+}
+
+# Ask kde if the powerdevil module is loaded
+PowerDevilRunning() {
+	DBusSend kded4 org.kde.kded /kded org.kde.kded.loadedModules | grep -q powerdevil
+}
+
+# gnome-power-manager was integrated into gnome-settings-daemon from version
+# 3.1.4, in a new Power plugin (though the handling of buttons is done in the
+# MediaKeys plugin.
+#
+# gnome-settings-daemon does not export a list of loaded plugins, but
+# fortunately the Power plugin does have its own Dbus interface we can check
+# for (We can't check the MediaKeys plugin, since that has been around for
+# longer).
+GnomeSettingsDaemonPowerRunning() {
+	# only check for gnome-settings- instead of gnome-settings-daemon
+	# because /proc/<pid>/stat only lists the first 15 characters
+	DBusSend gnome-settings- org.gnome.SettingsDaemon /org/gnome/SettingsDaemon/Power org.freedesktop.DBus.Introspectable.Introspect | grep -q 'interface name="org.gnome.SettingsDaemon.Power"'
+}
--- acpi-support-0.142.orig/debian/addons/lib/power-funcs
+++ acpi-support-0.142/debian/addons/lib/power-funcs
@@ -0,0 +1,144 @@
+# a micro library of helper functions for the power scripts
+
+umask 022
+
+PATH=$PATH:/usr/bin/X11
+POWERSTATE=/var/lib/acpi-support/powerstate
+
+# getXuser: get the user for the specified X display, or if none is
+# specified, then the user for whatever X display we find.
+# input: $displaynum: the X display to query
+# output: $XAUTHORITY: the path to the xauth data used for connecting to the
+#                      detected X display.
+#         $XUSER: the username of the user who owns the display.
+getXuser() {
+	local plist display uid user startx pid userhome IFS
+
+	if [ "$displaynum" ]; then
+		display=":$displaynum"
+	else
+		display=.+
+	fi
+
+	user=
+	if [ -x /usr/bin/ck-list-sessions ]; then
+		uid=$(ck-list-sessions | awk 'BEGIN { unix_user = ""; } /^Session/ { unix_user = ""; } /unix-user =/ { gsub(/'\''/,"",$3); unix_user = $3; } /x11-display = '\'$display\''/ { print unix_user; exit (0); } /x11-display = '\'$display.0\''/ { print unix_user; exit (0);}')
+
+		if [ "$uid" ]; then
+			IFS=:
+			set -- $(getent passwd $uid)
+			user=$1
+			unset IFS
+		fi
+	else
+		plist=$(pinky -fw) || pwf_error "pinky lost"
+		while read l; do
+			set -- $l
+			eval lastpp=\$$#
+			for ds in $2 $lastpp; do
+				case $ds in
+					$display)
+						user=$1
+						break
+						;;
+				esac
+			done
+			[ -z "$user" ] || break
+			for ds in $2 $lastpp; do
+				case $ds in
+					$display.0)
+						user=$1
+						break
+						;;
+				esac
+			done
+			[ -z "$user" ] || break
+		done <<-EOF
+			$plist
+		EOF
+	fi
+
+	if [ -z "$user" ]; then
+		startx=$(pgrep -n startx || :)
+		[ -z "$startx" ] || user=$(ps -o user --no-headers $startx || :)
+	fi
+
+	if [ x"$user" != x ]; then
+        	for pid in `ps -U "$user" -o pid=`; do
+			if grep -z -q XAUTHORITY /proc/$pid/environ; then
+				XAUTHORITY="$(grep -z XAUTHORITY /proc/$pid/environ | cut -d= -f2-)"
+				export XAUTHORITY
+				break
+			fi
+		done
+		if [ -z "$XAUTHORITY" ]; then
+			userhome="$(getent passwd "$user" | cut -d: -f6)"
+			XAUTHORITY="$userhome/.Xauthority"
+			export XAUTHORITY
+		fi
+	else
+		export XAUTHORITY=
+	fi
+	XUSER="$user"
+	export XUSER
+}
+
+# getXconsole: get the information for the active X console, if any.
+# 	calls getXuser to get information related to the logged-in user.
+# input: none
+# output: $XAUTHORITY: the path to the xauth data used for connecting to the
+#                      detected X display.
+#         $DISPLAY: the X display
+#         $XUSER: the username of the user who owns the display.
+getXconsole() {
+	local displaynum
+
+	displaynum=$(ck-list-sessions | awk 'BEGIN { active = 0; } /^Session/ { active = 0; } /active = TRUE/ { active = 1; } active && /x11-display = '\':.+\''/ { gsub(/'\':*'/,"",$3); print $3; exit (0); }')
+
+	if [ "$displaynum" ]; then
+		DISPLAY=":$displaynum"
+		export DISPLAY
+		getXuser
+	fi
+}
+
+# getState side effect: sets global variable STATE
+getState() {
+        /usr/bin/on_ac_power
+        if [ $? -eq 1 ]; then
+                STATE=BATTERY
+        else
+                STATE=AC
+        fi
+}
+
+#check our state has actually changed
+checkStateChanged() {
+	local OLDSTATE
+
+# do we have our state stashed?
+# XXX:	if vaiable STATE is unset, set it to the null string
+	: ${STATE=${STATE:-}}
+# XXX:	make sure variable STATE has a non-null value
+	[ "$STATE" ] || getState
+        if [ -f "$POWERSTATE" ]; then
+# XXX:	unset or empty variable STATE and an existing but empty POWERSTATE file
+#	and the function will probably have undesired side effects
+                read OLDSTATE <$POWERSTATE || :
+                if [ "$STATE" = "$OLDSTATE" ]; then
+                       exit 0
+                else
+#stash the new state
+# XXX:	unset or empty variable STATE, will create an empty POWERSTATE file
+                        echo "$STATE" > $POWERSTATE
+                fi
+        else
+#we need to stash the new state
+# XXX:	unset or empty variable STATE, will create an empty POWERSTATE file
+                echo "$STATE" > $POWERSTATE
+        fi
+}
+
+HDPARM='/sbin/hdparm -q'
+
+LIDSTATE=/var/lib/acpi-support/lidstate
--- acpi-support-0.142.orig/debian/addons/lib/screenblank
+++ acpi-support-0.142/debian/addons/lib/screenblank
@@ -0,0 +1,53 @@
+d=/tmp/.X11-unix
+for x in $d/X*; do
+    displaynum=${x#$d/X}
+    getXuser;
+    if [ "x$XAUTHORITY" != x ]; then
+	export DISPLAY=:"$displaynum"
+	if pidof xscreensaver >/dev/null; then
+		su "$XUSER" -s /bin/sh -c "xscreensaver-command -throttle"
+	fi
+	if [ x$LOCK_SCREEN = xtrue ]; then
+		if pidof xscreensaver >/dev/null; then
+			su "$XUSER" -s /bin/sh -c "xscreensaver-command -lock"
+		elif pidof gnome-screensaver > /dev/null; then
+			su "$XUSER" -s /bin/sh -c "gnome-screensaver-command --lock"
+		elif pidof dcopserver >/dev/null; then
+			avail_sessions=`dcop --all-users --list-sessions | grep '.DCOP.*__0'`
+			# send the lock command to all sessions
+			for session in $avail_sessions; do
+				# /dev/null because dcop warns if it can't connect to X (this is normal!)
+				dcop --session "$session" --all-users kdesktop KScreensaverIface lock > /dev/null 2>&1
+			done
+		elif pidof xautolock >/dev/null;then
+			su "$XUSER" -s /bin/sh -c "/usr/bin/xautolock -locknow"
+		elif [ -x /usr/bin/xlock ]; then
+			su "$XUSER" -s /bin/sh -c "/usr/bin/xlock -mode blank"
+		elif [ -x /usr/bin/xtrlock ]; then
+			su "$XUSER" -s /bin/sh -c "/usr/bin/xtrlock &"
+		elif [ -x /usr/bin/i3lock ]; then
+			su "$XUSER" -s /bin/sh -c "/usr/bin/i3lock"
+	 	fi
+	fi
+
+	case "$DISPLAY_DPMS" in
+	  xset)
+		su "$XUSER" -s /bin/sh -c "xset dpms force off"
+		;;
+	  xrandr)
+		su "$XUSER" -s /bin/sh -c "xrandr --output $XRANDR_OUTPUT --off"
+		;;
+	  vbetool)
+		/usr/sbin/vbetool dpms off
+		;;
+	esac
+
+	if [ x$RADEON_LIGHT = xtrue ]; then
+	    [ -x /usr/sbin/radeontool ] && radeontool light off
+	fi
+    else
+	if [ -x$DISPLAY_DPMS_NO_USER = xtrue ]; then
+	    [ -x /usr/sbin/vbetool ] && /usr/sbin/vbetool dpms off
+	fi 
+    fi
+done
--- acpi-support-0.142.orig/debian/addons/scripts/always-mute.sh
+++ acpi-support-0.142/debian/addons/scripts/always-mute.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# on ThinkPads, the volume keys always performs mute,
+# regardless of the previous state;  for the moment
+# we fake this by "always" unmuting and then remuting.
+# Kludge/behaviour copied over from 'thinkpad-keys'
+#  -Paul Sladen 2007-09-13
+[ -f /usr/share/acpi-support/key-constants ] || exit 0
+. /usr/share/acpi-support/key-constants
+#acpi_fakekey $KEY_VOLUMEUP
+acpi_fakekey $KEY_MUTE
--- acpi-support-0.142.orig/debian/addons/scripts/asus-keys-down.sh
+++ acpi-support-0.142/debian/addons/scripts/asus-keys-down.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+KEYS_DIR=/sys/class/leds/asus\:\:kbd_backlight/brightness
+test -f $KEYS_DIR || exit 0
+CURRENT=`cat $KEYS_DIR`
+NEXT=$((CURRENT<=0 ? 0 : CURRENT-1))
+echo $NEXT > $KEYS_DIR
--- acpi-support-0.142.orig/debian/addons/scripts/asus-keys-up.sh
+++ acpi-support-0.142/debian/addons/scripts/asus-keys-up.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+KEYS_DIR=/sys/class/leds/asus\:\:kbd_backlight/brightness
+test -f $KEYS_DIR || exit 0
+CURRENT=`cat $KEYS_DIR`
+NEXT=$((CURRENT>=3 ? 3 : CURRENT+1))
+echo $NEXT > $KEYS_DIR
--- acpi-support-0.142.orig/debian/addons/scripts/ejectbtn.sh
+++ acpi-support-0.142/debian/addons/scripts/ejectbtn.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+. /usr/share/acpi-support/key-constants
+acpi_fakekey $KEY_EJECTCD
--- acpi-support-0.142.orig/debian/addons/scripts/if-asus-not-eee.sh
+++ acpi-support-0.142/debian/addons/scripts/if-asus-not-eee.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+# The hotkeys for the Asus Eee PC conflict with brightness keys on other Asus
+# laptops. This script invokes another acpi script (passed as an argument), but
+# only if the system is not an Eee PC.
+
+test -d /sys/bus/platform/devices/eeepc && exit 0 
+
+/etc/acpi/$1
--- acpi-support-0.142.orig/debian/addons/scripts/lid.sh
+++ acpi-support-0.142/debian/addons/scripts/lid.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+test -f /usr/share/acpi-support/state-funcs || exit 0
+
+. /usr/share/acpi-support/power-funcs
+. /usr/share/acpi-support/policy-funcs
+. /etc/default/acpi-support
+
+[ -x /etc/acpi/local/lid.sh.pre ] && /etc/acpi/local/lid.sh.pre
+
+CheckPolicy && exit
+
+grep -q closed /proc/acpi/button/lid/*/state
+if [ $? -eq 0 ]
+then
+    . /usr/share/acpi-support/screenblank
+    if [ x$LID_SLEEP = xtrue ]; then
+	pm-suspend
+	if [ $? -ne 0 -a x$LID_SHUTDOWN = xtrue ]; then
+		shutdown -P now
+	fi
+    fi
+else
+    d=/tmp/.X11-unix
+    for x in $d/X*; do
+	displaynum=${x#$d/X}
+	getXuser;
+	if [ x$XAUTHORITY != x ]; then
+	    export DISPLAY=":$displaynum"
+	    if [ x$RADEON_LIGHT = xtrue ]; then
+		[ -x /usr/sbin/radeontool ] && radeontool light on
+	    fi
+	    case "$DISPLAY_DPMS" in
+		xset)
+			su "$XUSER" -s /bin/sh -c "xset dpms force on"
+			;;
+		xrandr)
+			su "$XUSER" -s /bin/sh -c "xrandr --output $XRANDR_OUTPUT --auto"
+			;;
+		vbetool)
+			/usr/sbin/vbetool dpms on
+			;;
+	    esac
+	    if pidof xscreensaver > /dev/null; then
+	        if on_ac_power; then 
+		    su "$XUSER" -s /bin/sh -c "xscreensaver-command -unthrottle"
+		fi
+		su "$XUSER" -s /bin/sh -c "xscreensaver-command -deactivate"
+	    fi
+	else
+	    if [ -x$DISPLAY_DPMS_NO_USER = xtrue ]; then
+            	[ -x /usr/sbin/vbetool ] && /usr/sbin/vbetool dpms on
+	    fi 
+	fi
+    done
+fi
+[ -x /etc/acpi/local/lid.sh.post ] && /etc/acpi/local/lid.sh.post
--- acpi-support-0.142.orig/debian/addons/scripts/mutebtn.sh
+++ acpi-support-0.142/debian/addons/scripts/mutebtn.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+. /usr/share/acpi-support/key-constants
+acpi_fakekey $KEY_MUTE
--- acpi-support-0.142.orig/debian/addons/scripts/power.sh
+++ acpi-support-0.142/debian/addons/scripts/power.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+. /usr/share/acpi-support/power-funcs
+. /usr/share/acpi-support/policy-funcs
+
+if [ -z "$*" ] && { CheckPolicy || CheckUPowerPolicy; }; then
+    exit;
+fi
+
+pm-powersave $*
--- acpi-support-0.142.orig/debian/addons/scripts/powerbtn-acpi-support.sh
+++ acpi-support-0.142/debian/addons/scripts/powerbtn-acpi-support.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# This script initiates a shutdown when the power putton has been
+# pressed. Loosely based on the sample that ships with the acpid package.
+# If the acpid sample is present as a real config file (as it was in earlier
+# versions of acpid), we skip this script. (Purging and reinstalling acpid
+# resolves this situation, or simply deleting /etc/acpi/events/powerbtn.)
+
+if [ -f /etc/acpi/events/powerbtn -o -f /etc/acpi/events/powerbtn.dpkg-bak ] ; then 
+	logger Acpi-support not handling power button, acpid handler exists at /etc/acpi/events/powerbtn or /etc/acpi/events/powerbtn.dpkg-bak.
+	exit 0
+fi
+
+[ -e /usr/share/acpi-support/policy-funcs ] || exit 0
+
+. /usr/share/acpi-support/policy-funcs
+
+if CheckPolicy; then
+	exit 0
+fi
+
+if [ -x /etc/acpi/powerbtn.sh ] ; then
+	# Compatibility with old config script from acpid package
+	/etc/acpi/powerbtn.sh
+elif [ -x /etc/acpi/powerbtn.sh.dpkg-bak ] ; then
+        # Compatibility with old config script from acpid package
+	# which is still around because it was changed by the admin
+        /etc/acpi/powerbtn.sh.dpkg-bak
+else
+	# Normal handling.
+	/sbin/shutdown -h -P now "Power button pressed"
+fi
+
--- acpi-support-0.142.orig/debian/addons/scripts/sleep_suspend.sh
+++ acpi-support-0.142/debian/addons/scripts/sleep_suspend.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# This script HANDLES the sleep or suspend button (does not TRANSLATE it). It
+# is part of the *suspend* side of acpi-support, not the special keys
+# translation side. If this script is called, it is assumed to be the result of
+# a suspend key press that can also be heard by other parts of the system. The
+# only time that it actually does something is when it is determined that no
+# other parts of the system are listening (this is what the CheckPolicy call
+# does).
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+. /etc/default/acpi-support
+. /usr/share/acpi-support/policy-funcs
+
+CheckPolicy && exit 0
+
+[ x$1 != xsleep ] || [ x$ACPI_SLEEP = xtrue ] || exit 0
+
+[ x$1 != xsuspend ] || [ x$ACPI_HIBERNATE = xtrue ] || exit 0
+
+if [ x$LOCK_SCREEN = xtrue ]; then
+	. /usr/share/acpi-support/screenblank
+fi
+
+if [ x$1 = xsleep ]; then
+	pm-suspend
+elif [ x$1 = xsuspend ]; then
+	pm-hibernate
+fi
+
--- acpi-support-0.142.orig/debian/addons/scripts/sleep_suspendbtn.sh
+++ acpi-support-0.142/debian/addons/scripts/sleep_suspendbtn.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+command=$1
+if [ $command = "sleep" ]; then
+	key=$KEY_SLEEP
+elif [ $command = "suspend" ]; then
+	key=$KEY_SUSPEND
+else
+	logger -t${0##*/} -perr -- "Error: Cannot recognize command $1"
+fi
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+. /usr/share/acpi-support/policy-funcs
+
+if CheckPolicy; then
+  # If gnome-power-manager or klaptopdaemon are running, generate the X
+  # "sleep/suspend" key. The daemons will handle that keypress according to
+  # their settings.
+
+  # (With this script being called only when a key is pressed that is *not*
+  # seen as a suspend key by the rest of the system, we still need to do this
+  # translation here.)
+  
+  . /usr/share/acpi-support/key-constants
+  acpi_fakekey $key 
+else
+  # No power management daemons are running. Divert to our own implementation.
+
+  # Note that sleep.sh assumes that the pressed key is also seen by the rest
+  # of the system. However, it will choose the right path (our own
+  # implementation) if CheckPolicy says so. And this way we have a single
+  # user-configurable point for how we do suspend. (Not that that's nice, 
+  # but until we have pluggable suspend methods this is the way to go.)
+  
+  /etc/acpi/sleep_suspend.sh $command
+fi
+
--- acpi-support-0.142.orig/debian/addons/scripts/sonybright.sh
+++ acpi-support-0.142/debian/addons/scripts/sonybright.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+# TODO: Change above to /bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+BRIGHTNESS=$(cat /sys/class/backlight/sony/brightness)
+
+if [ "$BRIGHTNESS" -gt 7 ]; then
+	BRIGHTNESS=0
+fi
+
+if [ "x$1" = "xdown" ]; then
+   if [ "x$BRIGHTNESS" != "x0" ]; then
+      BRIGHTNESS=$(( $BRIGHTNESS - 1 ))
+      echo $BRIGHTNESS > /sys/class/backlight/sony/brightness
+   else
+      [ -x /usr/bin/spicctrl ] && /usr/bin/spicctrl -b 0   
+   fi
+   # Recent nvidia Sonys have ACPI methods that do nothing. Thanks, Sony.
+   [ -x /usr/bin/smartdimmer ] && smartdimmer -d 2>/dev/null
+elif [ "x$1" = "xup" ]; then
+   if [ "x$BRIGHTNESS" != "x7" ]; then
+      BRIGHTNESS=$(( $BRIGHTNESS + 1 ))
+      echo $BRIGHTNESS > /sys/class/backlight/sony/brightness
+   fi
+   [ -x /usr/bin/smartdimmer ] && smartdimmer -i 2>/dev/null
+else
+   echo >&2 Unknown argument $1
+fi
--- acpi-support-0.142.orig/debian/addons/scripts/voldownbtn.sh
+++ acpi-support-0.142/debian/addons/scripts/voldownbtn.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+. /usr/share/acpi-support/key-constants
+acpi_fakekey $KEY_VOLUMEDOWN
--- acpi-support-0.142.orig/debian/addons/scripts/volupbtn.sh
+++ acpi-support-0.142/debian/addons/scripts/volupbtn.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+. /usr/share/acpi-support/key-constants
+acpi_fakekey $KEY_VOLUMEUP
--- acpi-support-0.142.orig/debian/changelog
+++ acpi-support-0.142/debian/changelog
@@ -0,0 +1,1233 @@
+acpi-support (0.142-4~tanglu2) bartholomea-updates; urgency=high
+
+  * Build for bartholomea.
+
+ -- Jon Severinsson <jon@severinsson.net>  Tue, 24 Mar 2015 16:00:00 +0100
+
+acpi-support (0.142-4) unstable; urgency=high
+
+  * SECURITY UPDATE: unquoted variables that are computed from user processes
+    - quote variables in policy-funcs, power-funcs, screenblank, lid.sh
+    - CVE-2014-0484
+
+ -- Michael Meskes <meskes@debian.org>  Wed, 03 Sep 2014 19:12:57 +0200
+
+acpi-support (0.142-3) unstable; urgency=medium
+
+  * Execute xtrlock in background because it blocks which prevents suspend.
+    (Closes: #755172)
+  * Only check for gnome-settings- instaed of gnome-settings-daemon because
+    /proc/<pid>/stat only lists the first 15 characters
+    (Closes: #755969)
+  * Remove some tests for old power management services.
+
+ -- Michael Meskes <meskes@debian.org>  Sat, 09 Aug 2014 12:21:18 +0200
+
+acpi-support (0.142-2) unstable; urgency=high
+
+  * SECURITY UPDATE: root escalation via race in policy-funcs
+    - lib/policy-funcs: use the X console user instead of the one from an
+      arbitrary kded4 or gnome-settings-daemon process.
+    - power.sh: also source /usr/share/acpi-support/power-funcs.
+    - CVE-2014-1419
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 18 Jul 2014 11:54:22 +0200
+
+acpi-support (0.142-1) unstable; urgency=medium
+
+  * Delete config files that may have been left due to a typo.
+  * Corrected typo in default file. (Closes: #754055)
+  * Imported Upstream version 0.142
+  * Remove all configfiles that were obsoleted by the new version.
+  * Updated key-constants from latest kernel.
+
+ -- Michael Meskes <meskes@debian.org>  Mon, 07 Jul 2014 13:47:39 +0200
+
+acpi-support (0.141-4) unstable; urgency=medium
+
+  * Removed duplicated lines in changelog
+  * Improve test for running systemd-logind.
+    Thanks to Marcin Szewczyk <Marcin.Szewczyk@wodny.org> (Closes: #752781)
+  * Revert "Simplified check for active display." (Closes: #752283)
+  * Added option to shutdown system if suspend fails. (Closes: #704428)
+
+ -- Michael Meskes <meskes@debian.org>  Mon, 30 Jun 2014 13:43:51 +0200
+
+acpi-support (0.141-3) unstable; urgency=medium
+
+  * Added check for i3lock. (Closes: #732690)
+  * Downgrade acpi-fakekey dependency to recommendation (Closes: #716777)
+  * Fixed typo in /etc/acpi/asus-wireless.sh (Closes: #720639)
+  * Simplified check for active display.
+  * Remove old asus brightness conffiles (Closes: #706910)
+  * Added mate-power-manager and systemd-logind as power managers.
+    Thanks to pasky@ucw.cz (Closes: #738696)
+  * Bumped Standards-Version to 3.9.5, no changes needed.
+  * Added systemd support and improved acpi_fakekey.
+    Thanks to David Härdeman <david@hardeman.nu> (Closes: #717398)
+  * Make sure on_ac_power error return is not intepreted as not running on AC
+    power. (Closes: #728692, #741597)
+  * Added systemd support and improved acpi_fakekey.
+    Thanks to David Härdeman <david@hardeman.nu> (Closes: #717398)
+  * Security is more important than speed, therefore make sure display is
+    locked before suspending. (Closes: #593303, #700696)
+  * All screen lockers should be suggested alternatives (Closes: #737945)
+  * Removed deprecated setting of init priorities.
+  * Canonicalized VCS information.
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 19 Jun 2014 13:47:49 +0200
+
+acpi-support (0.141-2) unstable; urgency=low
+
+  * Check for running screensavers before looking for installed ones.
+    (Closes: #692262)
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 06 Dec 2012 13:06:59 +0100
+
+acpi-support (0.141-1) unstable; urgency=low
+
+  * Imported Upstream version 0.141:
+    + drop asus-brightness-{up,down} handlers and asus-brn-{down,up} scripts.
+    + asus-touchpad.sh: Don't handle Synaptics devices.
+  * Use hardening build options.
+  * Also use variable for switching display back on via xrandr.
+    Thanks to Guillem Jover <guillem@debian.org> (Closes: #682012)
+  * Accept xautolock as screen locker.
+    Thanks to gabriel <gabreal@lavabit.com> (Closes: #683914)
+  * Downgraded dependency on consolekit to a suggestion because acpi-support
+    works well without it in almost all cases and the overhead created for base
+    system is huge. (Closes: #686020)
+  * Some more cleaning up of dependencies.
+  * Allow both, :0 and :0.0, as display information n getXuser().
+    (Closes: #686391)
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 12 Oct 2012 12:11:39 +0200
+
+acpi-support (0.140-5) unstable; urgency=low
+
+  * Rewrote getXuser in power-funcs to only use ck-list-sessions if installed,
+    if not fallback to using pinky instead. This enables us to downgrade
+    consolekit to a recommendation instead of a dependency. (Closes: #665987)
+  * Unset IFS after using it to make other commands use standard setting again.
+    (Closes: #680409)
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 05 Jul 2012 11:03:20 +0200
+
+acpi-support (0.140-4) unstable; urgency=low
+
+  * Remove examples that are variants of files still in use.
+  * Simplified new sleep and hibernate script.
+  * Simplifying some patches as suggested by Cristian Ionescu-Idbohrn
+    <cristian.ionescu-idbohrn@axis.com>.
+  * Applied patch to simplify power-funcs.
+    Thanks to Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
+  * Simplified and robustified state-funcs.
+    Thanks to Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
+  * Remove dependency of `acpi-support-base` on `kbd | console-utilities` and
+    move the dependency on `consolekit` from `acpi-support` to
+    `acpi-support-base` since `getXuser()` and `getXconsole()`, using
+    `ck-list-sessions` instead of `fgconsole` since 0.140-1, are in
+    `power-funcs` which is in `acpi-support-base`.
+    Thanks to Paul Menzel <pm.debian@googlemail.com> (Closes: #678241)
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 21 Jun 2012 13:58:02 +0200
+
+acpi-support (0.140-3) unstable; urgency=low
+
+  * Remove hibernatebtn.sh from package. It's no longer needed.
+    (Closes: #667514)
+  * Also remove the other files deprecated in 0.140-2.
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 05 Apr 2012 11:41:25 +0200
+
+acpi-support (0.140-2) unstable; urgency=low
+
+  * Replaced sleep.sh, hibernate.sh, sleepbtn.sh, hibernatebtn.sh with newly
+    written scripts that handle both events to reduce code redundancy.
+    (Closes: #664702)
+  * Added generic key press event for suspend keys. (Closes: #664703)
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 30 Mar 2012 14:56:50 +0200
+
+acpi-support (0.140-1) unstable; urgency=low
+
+  * Imported new Upstream version 0.140
+  * Upstream switched to consolekit to find the current X user, so we do the
+    same.
+  * Fixed typo in default file. (Closes: #662730)
+
+ -- Michael Meskes <meskes@debian.org>  Tue, 06 Mar 2012 17:44:59 +0100
+
+acpi-support (0.138-14) unstable; urgency=low
+
+  * Re-wrote rules file to not throw an error on binary only builds.
+
+ -- Michael Meskes <meskes@debian.org>  Sun, 04 Mar 2012 15:10:27 +0100
+
+acpi-support (0.138-13) unstable; urgency=low
+
+  * Make xrandr output device configurable. (Closes: #657673)
+  * Make sure xscreensaver gets called even is user is in a screen session.
+    (Closes: #658232)
+  * Bumped Standards-Version to 3.9.3, no changes needed.
+  * Added event file for WLAN on some Thinkpads. (Closes: #656703)
+  * Made ASUS backlit key brightness up/down buttons work.
+
+ -- Michael Meskes <meskes@debian.org>  Sun, 04 Mar 2012 12:29:24 +0100
+
+acpi-support (0.138-12) unstable; urgency=low
+
+  * Check for gnome-settings-daemon instead of gnome-session because the former
+    is really needed for power management.
+  * Fixed typo that made the script not find KDE4 anymore. (Closes: #655938)
+  * Made screen disabling optional for systems without an active user.
+    (Closes: #653205)
+  * Moved to debhelper 7 and simplified rules file.
+  * Do not print an error message if acpid couldn't be restarted because it
+    wasn't running. (Closes: #656473)
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 20 Jan 2012 12:37:29 +0100
+
+acpi-support (0.138-11) unstable; urgency=low
+
+  * Check for power management in gnome3.
+    Thanks to Matthijs Kooijman <matthijs@stdin.nl> (Closes: #655394)
+  * Simplified lid.sh a little bit more. 
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 12 Jan 2012 09:52:19 +0100
+
+acpi-support (0.138-10) unstable; urgency=low
+
+  * Made init script use on_ac_power. (Closes: #631629)
+  * Fixed typos and language errors in README.Debian.
+    Thanks to Wookey <wookey@wookware.org> (Closes: #648422)
+  * Made screenblank script use $XUSER that is set instead of the unset $user.
+    At the same time added xlock and xtrlock as possible lock managers.
+    Thanks to Santiago Garcia Mantinan <manty@debian.org>
+    (Closes: #605276, #649562)
+  * Also added gnome-screensaver as valid screensaver option.
+  * Rolled more logic into /usr/share/acpi-support/screenblank instead of
+    duplicating it in /etc/acpi/sleep.sh and /etc/acpi/screenblank.sh.
+  * Rewrote and simplified lid.sh.
+  * Made power-funcs also use on_ac_power again, removing the very old patch
+    that removed it. As we use on_ac_power elsewhere this should be fine here
+    as well.
+  * Add support for "status" action to the init scripts.
+    Thanks to Peter Eisentraut <petere@debian.org> (Closes: #651864)
+  * Allow SPIC and SNC events on Sony laptops. (LP: #240915, #295809)
+  * Added patch to fix rotation issues. (LP: #217182)
+  * Added build-arch and build-indep targets to rules file.
+  * Bumped Standards-Version to 3.9.2, no changes needed.
+
+ -- Michael Meskes <meskes@debian.org>  Tue, 13 Dec 2011 14:54:40 +0100
+
+acpi-support (0.138-9) unstable; urgency=low
+
+  * Do not unload uinput module on acpi-fakekey stop. It might be used
+    elsewhere. (Closes: #619316)
+
+ -- Michael Meskes <meskes@debian.org>  Wed, 23 Mar 2011 20:15:14 +0100
+
+acpi-support (0.138-8) unstable; urgency=low
+
+  * Create fifo under /var/run instead of using shared memory as filesystem.
+    (Closes: #616023)
+  * The kernel might give a tty number despite running on a serial line. Make
+    sure the scripts can cope with this. (Closes: #612849)
+  * Removed old workaround needed when acpi-fakekey became its own package
+    because squeeze was released with acpi-fakekey package. (Closes: #613901)
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 11 Mar 2011 11:29:28 +0100
+
+acpi-support (0.138-7) unstable; urgency=low
+
+  * Use /dev/uinput instead of the no longer existing /dev/input/uinput.
+    (Closes: #612628) - thanks to Sven Joachim <svenjoac@gmx.de>
+  * Use a smaller canon (no forks) to edit /tmp/.X11-unix/* (Closes:
+    #609276) - thanks to Cristian Ionescu-Idbohrn <cristian.ionescu-
+    idbohrn@axis.com>
+  * Added a small explanation why some packages are recommended.
+    (Closes: #611699)
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 10 Feb 2011 12:03:35 +0100
+
+acpi-support (0.138-6) unstable; urgency=low
+
+  * Further improvements on power-funcs (Closes: #607981) - thanks to
+    Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
+  * Cleaned up asus-touchpad.sh and improved error handling (Closes:
+    #607624) - thanks to Cristian Ionescu-Idbohrn <cristian.ionescu-
+    idbohrn@axis.com>
+  * Optimize asus-wireless.sh to consume a few cpu cycles less. (Closes:
+    #607976) - thanks to Cristian Ionescu-Idbohrn <cristian.ionescu-
+    idbohrn@axis.com>
+  * Replaced cat with builtin read (Closes: #608040) - thanks to
+    Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
+  * Cleaned up and re-diffed patches.
+  * Quote name of scripts executed from init script to cope with blanks.
+    (Closes: #608117)
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 07 Jan 2011 15:44:35 +0100
+
+acpi-support (0.138-5) unstable; urgency=low
+
+  * Test availability of state-funcs before using it. (Closes: #607435)
+  * Also fix CheckPolicy usage in example.
+  * Fixed power.sh to not run a subshell for a simple test. (Closes:
+    #607061)
+  * Joined screenblank patches into one and simplified it some. (Closes:
+    #607096)
+  * Make state-funcs more efficient and support iw alongside iwconfig.
+    (Closes: #607111) - thanks to Cristian Ionescu-Idbohrn
+    <cristian.ionescu-idbohrn@axis.com>
+  * Make device-funcs work without forking. (Closes: #607128) - thanks
+    to Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
+  * As per recommendation on debian-devel acpi-support-base now depends
+    on kbd instead of console-tools.
+
+ -- Michael Meskes <meskes@debian.org>  Sun, 19 Dec 2010 14:27:15 +0100
+
+acpi-support (0.138-4) unstable; urgency=low
+
+  * Active console may also be 'serial'. (Closes: #606214)
+
+ -- Michael Meskes <meskes@debian.org>  Sat, 11 Dec 2010 14:46:55 +0100
+
+acpi-support (0.138-3) unstable; urgency=low
+
+  * Fixed another breakage due to the power-funcs error checking.
+    (Closes: #605219)
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 02 Dec 2010 08:42:47 +0100
+
+acpi-support (0.138-2) unstable; urgency=low
+
+  * Made power-funs patch work correctly if X is not running on the
+    active console. (Closes: #605219)
+
+ -- Michael Meskes <meskes@debian.org>  Sun, 28 Nov 2010 14:07:20 +0100
+
+acpi-support (0.138-1) unstable; urgency=low
+
+  * New Upstream version 0.138, we keep the files upstream deleted because we
+    are still on an older kernel.
+  * Added patch to optimize policy functions. (Closes: #603864) - thanks
+    to Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
+  * Make power-funcs work correctly with latest X and gdm3. (Closes:
+    #591813, #603796) - thanks to Luca Niccoli <lultimouomo@gmail.com>
+  * Robustify power-funcs and log errors where possible. (Closes:
+    #604251) - thanks to Cristian Ionescu-Idbohrn <cristian.ionescu-
+    idbohrn@axis.com>
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 26 Nov 2010 16:45:44 +0100
+
+acpi-support (0.137-7) unstable; urgency=low
+
+  * Adjusted remaining scripts to new CheckPolicy function. (Closes:
+    #603738)
+
+ -- Michael Meskes <meskes@debian.org>  Wed, 17 Nov 2010 09:47:42 +0100
+
+acpi-support (0.137-6) unstable; urgency=low
+
+  * Re-diffed patches to remove fuzz. (Closes: #593518)
+  * Update key-constants from 2.6.32 kernel in squeeze. (Closes:
+    #603471)
+  * Optimized CheckPolicy to save resources. (Closes: #593975)
+
+ -- Michael Meskes <meskes@debian.org>  Mon, 15 Nov 2010 14:22:40 +0100
+
+acpi-support (0.137-5) unstable; urgency=low
+
+  * Removed leftover packaging files coming from the Ubuntu debian/
+    directory. (Closes: #591815)
+  * Improve suspned time by backgrounding X commands. (Closes: #593303)
+    - thanks to David Fries <david@fries.net>
+
+ -- Michael Meskes <meskes@debian.org>  Tue, 17 Aug 2010 09:48:09 +0200
+
+acpi-support (0.137-4) unstable; urgency=low
+
+  * Added option to suspend laptop on lid close. (Closes: #589625) -
+    thanks to Luca Niccoli <lultimouomo@gmail.com>
+  * Bumped Standards-Version to 3.9.1, no changes needed.
+
+ -- Michael Meskes <meskes@debian.org>  Mon, 16 Aug 2010 15:33:16 +0200
+
+acpi-support (0.137-3) unstable; urgency=low
+
+  * Re-added lost brace to policy-funcs. (Closes: #587599)
+  * Give udev time to create devices before starting acpi-fakekeyd.
+    (Closes: #584203)
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 02 Jul 2010 17:59:04 +0200
+
+acpi-support (0.137-2) unstable; urgency=low
+
+  * Bumped versioned build-dependency on debhelper.
+  * Bumped Standards-Version to 3.9.0, no changes needed.
+  * Deleted stray 'i' in power-funcs.
+  * Converted Conflicts to Breaks.
+
+ -- Michael Meskes <meskes@debian.org>  Tue, 29 Jun 2010 13:50:31 +0200
+
+acpi-support (0.137-1) unstable; urgency=low
+
+  * Imported new Upstream version 0.137
+  * Removed old event handlers in /etc/acpi/events that are no longer
+    distributed by this package. 
+  * Fixed wireless toggling by rewriting the functions to use rfkill.
+    (Closes: #581312) - thanks to Luca Niccoli <lultimouomo@gmail.com>
+  * Made sure that ASUS key events are not handled on EeePCs because
+    they are correctly handled by the kernel input layer on these
+    systems. (Closes: #586924)
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 24 Jun 2010 14:08:54 +0200
+
+acpi-support (0.136-4) unstable; urgency=low
+
+  * Make sure acpi_fakekeyd sends a EV_SYN package after the key press
+    event. (Closes: #577603)
+  * Do not try to provide a login environment when calling su which is
+    neither needed nor correctly implemented in this script. (Closes:
+    #585736)
+
+ -- Michael Meskes <meskes@debian.org>  Tue, 15 Jun 2010 18:48:21 +0200
+
+acpi-support (0.136-3) unstable; urgency=low
+
+  * Do not complain if daemon is already running.
+  * Do not recommend hal because it doesn't seem to be needed anymore.
+    (Closes: #580019)
+
+ -- Michael Meskes <meskes@debian.org>  Tue, 04 May 2010 14:02:16 +0200
+
+acpi-support (0.136-2) unstable; urgency=low
+
+  * Added postinst script to make sure acpi_fakekeyd is stopped before
+    starting it (Closes: #579798)
+
+ -- Michael Meskes <meskes@debian.org>  Sat, 01 May 2010 19:24:42 +0200
+
+acpi-support (0.136-1) unstable; urgency=low
+
+  * New Upstream version 0.136: drop asus-eee-volume-* event handlers, which
+    are also now superseded by a kernel input device. (Closes: #578889)
+  * Moved acpi_fakekey to its own package. (Closes: #487697)
+  * Added source/format file.
+  * Do not run power management scripts before syslog starts. (Closes: #578637)
+
+ -- Michael Meskes <meskes@debian.org>  Sun, 25 Apr 2010 17:03:56 +0200
+
+acpi-support (0.133-2) unstable; urgency=low
+
+  * Use logger for error message in power button script to make sure the admin
+    can see it in the logs.
+  * Get system information from kernel interface instead of using
+    dmidecode. (Closes: #572931)
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 19 Mar 2010 17:41:06 +0100
+
+acpi-support (0.133-1) unstable; urgency=low
+
+  * New upstream version.
+  * Made asus-wireless.sh cope with different strings identifying the
+    vendor. (Closes: #571703)
+  * Added patch to handle special ASUS touchpad leds. (Closes: #571692)
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 05 Mar 2010 15:14:21 +0100
+
+acpi-support (0.132-2) unstable; urgency=low
+
+  * Clarify rfkill usage for Thinkpad wireless toggling.
+  * Moved dmidecode back to Recommends. It's used on more systems than
+    originally anticipated.
+  * Do not suggest nvclock because it apparently is not used anymore.
+  * Suggest xinput that is needed for Asus touchpad toggling.
+  * Downgraded toshset to a suggestion.
+  * Make sure asus-wireless.sh is only executed if we are really on an
+    Asus laptop. Other brands generate the same key event but must not
+    execute the script. (Closes: #568244, #569756) - thanks to Stefano
+    <pietranera@gmail.com>
+  * Bumped Standards-Version to 3.8.4, no changes needed.
+
+ -- Michael Meskes <meskes@debian.org>  Tue, 16 Feb 2010 13:14:57 +0100
+
+acpi-support (0.132-1) unstable; urgency=low
+
+  * New upstream version:
+    - eliminate setLEDAsusWireless altogether; this needs to be handled
+      directly by the kernel when the kill switch is toggled, not in a racy
+      and inconsistently-applied manner by acpi-support; and in at least some
+      cases we know this already *does* happen because of reports that
+      /sys/devices/platform/asus-laptop/wlan, used for toggling "the LED" with
+      the current kernel module, is actually an interface for toggling *the
+      antenna* that happens to also toggle the LED.  Likewise, we should not
+      be responsible for bringing up the antenna at boot, so get rid of the
+      file in the start.d directory.  LP: #293943, #204378, #334368.
+    - Remove the asus-wireless-2 event handler, which is completely redundant
+      with the pre-existing asus-wireless-{off,on} handlers.  LP: #207871.
+    - Add support for ATKD 00000037 to events/asus-touchpad.
+      This makes the disable touchpad buttons (!) on the EeePc 1005HA work as
+      intended.  LP: #502720.
+  * Allow gnome-screensaver as alternative to xscreensaver. (Closes:
+    #564442)
+  * Do not remove conffiles that were later brought back and are
+    installed again. (Closes: #564455)
+
+ -- Michael Meskes <meskes@debian.org>  Sat, 09 Jan 2010 19:19:51 +0100
+
+acpi-support (0.131-6) unstable; urgency=low
+
+  * Cleaned up lsb-base logging usage in init script. (Closes: #563919) -
+    thanks to Jonathan McDowell <noodles@earth.li>
+  * Downgraded dmidecode to Suggests because it is only needed on
+    Thinkpads.
+  * Suggest rfkill and exit ibm-wireless.sh if rfkill is not installed.
+    (Closes: #564169)
+  * Remove test for powersaved. The package got removed from Debian.
+    (Closes: #553643)
+
+ -- Michael Meskes <meskes@debian.org>  Sat, 09 Jan 2010 15:50:08 +0100
+
+acpi-support (0.131-5) unstable; urgency=low
+
+  * Made cycling through wireless and bluetooth states configurable to
+    some degree. (Closes: #527276)
+  * Downgraded nvclock to suggestion because it is only needed for a few
+    systems. (Closes: #562883)
+  * Made method for switching display on and off configurable. (Closes:
+    #555110)
+
+ -- Michael Meskes <meskes@debian.org>  Mon, 28 Dec 2009 23:08:35 +0100
+
+acpi-support (0.131-4) unstable; urgency=low
+
+  * Really install asus-wireless-wlan event file.
+  * Re-added thinkpad-mute event handling.
+
+ -- Michael Meskes <meskes@debian.org>  Sun, 27 Dec 2009 11:39:56 +0100
+
+acpi-support (0.131-3) unstable; urgency=low
+
+  * It seems that on some Asus systems at least this script breaks
+    wireless completely. Therefore we remove it for now. If we find a
+    way to do it right on all systems we can re-enable it. (Closes:
+    #482349)
+  * Made wireless control button work on Asus A3A and other similar
+    systems. In the process updated state-funcs to not use deprecated
+    /sys/class/net/*/wireless directory anymore. (Closes: #561953) -
+    thanks to Jakub Adam <jakub.adam@ktknet.cz>
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 25 Dec 2009 14:23:17 +0100
+
+acpi-support (0.131-2) unstable; urgency=low
+
+  * Switch off screen even if no user is logged in. (Closes: #503986)
+  * Remove dependency on hdparm, finger, powermgmt-base because neither
+    is used anymore.
+  * Recommend xscreensaver that is used to blank and lock the screen.
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 17 Dec 2009 14:53:17 +0100
+
+acpi-support (0.131-1) unstable; urgency=low
+
+  * Pinky prints "?:0" as tty so we ought to check for that too.
+    (Closes: #560804)
+  * Do not try to modprobe uinput if it is already available. It might
+    already be (Closes: #556897)
+  * New upstream version:
+    - events/lenovo-undock, undock.sh: new scripts to handle the Fn+F9 "undock"
+      button on ThinkPads, which unfortunately nothing else handles. Thanks to
+      Jeffrey Baker for the first implementation. LP: #18864. (Closes: #388160)
+  * Re-added thinkpad volume key events. (Closes: #558009)
+  * Patched asus-wireless start script to not disable wireless. (Closes:
+    #482349)
+
+ -- Michael Meskes <meskes@debian.org>  Wed, 16 Dec 2009 11:20:51 +0100
+
+acpi-support (0.130-2) unstable; urgency=low
+
+  * Made grep accept non-ascii characters. (Closes: #559911) - thanks to
+    Євгеній Мещеряков <eugen@debian.org>
+  * Made screenblank use the right user to call xset. (Closes: #558216)
+  * Made pidof use full paths where needed to prevent denial of service
+    attacks by local users.(Closes: #553643)
+
+ -- Michael Meskes <meskes@debian.org>  Fri, 11 Dec 2009 17:33:29 +0100
+
+acpi-support (0.130-1) unstable; urgency=low
+
+  * Fixed some typos.
+  * New upstream version.
+  * Remove suggests on laptop-mode-tools as they are no longer called
+    from any script except those under examples.
+  * Made su use /bin/sh even if the user uses some non-posix shell.
+    (Closes: #557442)
+  * Removed bashism in power-funcs and made all script use /bin/sh.
+
+ -- Michael Meskes <meskes@debian.org>  Sun, 22 Nov 2009 12:32:08 +0100
+
+acpi-support (0.129-2) unstable; urgency=low
+
+  * Better document the need of the uinput module. (Closes: #556897)
+  * Remove 10-thinkpad-standby-led.sh that was forgotten earlier.
+    (Closes: #556896)
+  * Remove events/videobtn for good. (Closes: #556261)
+  * Make sure 90-hdparm.sh is deleted no matter if it is a file or a
+    symlink. (Closes: #556895)
+
+ -- Michael Meskes <meskes@debian.org>  Wed, 18 Nov 2009 16:19:08 +0100
+
+acpi-support (0.129-1) unstable; urgency=low
+
+  * New upstream version:
+    - Fix ibm-wireless to use the 'rfkill' tool for toggling bluetooth,
+      recommending wireless-tools which currently provides this; and fix
+      the isAnyWirelessPoweredOn function for the latest change in the rfkill
+      /sys interface, looking under phy80211/ instead of under device/
+      (LP: #397698).  The toggleAllWirelessStates() function is still broken,
+      because the rfkill state on the iwl3945 (at least) is still being done
+      in the kernel, so we work around this for now by leaving the function
+      inactive.
+      Closes: #548252, #554112, #491442
+    - Fix the touchpad handler to use xinput instead of (unreliable)
+      synclient, and add a corresponding Recommends; and call getXconsole so
+      we can actually talk to the X server.  LP: #447211.
+    - new events/asus-f8sv-touchpad: handle another touchpad ACPI event on
+      another ASUS model.  LP: #218598.
+    - lib/power-funcs: adjust getXconsole to work when the tty number is not
+      present on the X commandline.
+    - lib/policy-funcs: Recognize KDE4 PowerDevil as a power manager.
+      LP: #387750.
+    - lib/policy-funcs: Recognize xfce4-power-manager as a power manager.
+      LP: #425155
+    - Drop /etc/acpi/start.d/90-hdparm.sh: this is redundant because we're
+      already calling pm-powersave on start (either via /etc/acpi/power.sh,
+      or by one of the desktop power managers as enumerated in
+      lib/policy-funcs) so there's no reason we should be reapplying the
+      policy here.  LP: #443992, #438355, #318980.
+      Closes: #509597, #529604, #533754
+    - Add guidance-power-manager to the list of known desktop power managers.
+      LP: #154910
+    - lib/policy-funcs: Recognize dalston as a power manager.  LP: #432578
+    - Drop /etc/acpi/start.d/10-save-dmidecode.sh, which is irrelevant given
+      the existence of /sys/class/dmi/id/.
+    - Drop events/panasonic-brightness-{down,up}, events/panasonic-mute,
+      events/panasonic-volume-{down,up}, and panabright.sh, confirmed to be
+      implemented now by the panasonic-laptop kernel driver. Closes: #555603
+    - Drop events/asus-{a6u-touchpad,internet,lock,wireless} and
+      events/asus-media-{next,play-pause,prev,stop}, confirmed to be
+      implemented by the asus-laptop kernel driver.
+    - Drop events/thinkpad-thinkpad and thinkpad-thinkpad.sh, which is also
+      implemented in the thinkpad_acpi driver and should have been dropped a
+      while ago.
+    - Drop panapower.sh, which seems to have never been used.
+    - Clean up /etc/acpi/toshbright.sh, which was meant to be removed back in
+      jaunty
+    - Drop events/video_brightness{down,up}, video_brightness{up,down}.sh: at
+      least some platforms that use these ACPI sequences are seeing them
+      correctly translated to input events, so those users will see duplicate
+      events unless we drop them.  LP: #178860.
+      Closes: #556261
+    - Drop events/sony-eject, confirmed in bug reports to no longer work due
+      to its use of acpi_fakekey.  This needs to be implemented in the kernel
+      input layer, but in the meantime there's no reason to keep this here.
+      LP: #76924.
+    - Drop events/panasonic-{hibernatebtn,sleepbtn}, also reported to not work
+      now due to the acpi_fakekey implementation.
+    - Don't install power hook directories, instead just call pm-powersave
+  * Added old powersave stuff to examples.
+  * Bumped Standards-Version to 3.8.3, no changes needed.
+  * Re-diffed patches
+  * Re-added hibernatebtn.sh that was removed upstream.
+  * Re-added Sony brightness files. Closes: #531074
+  * Re-added Sony eject event.
+  * Remove stuff no longer needed.
+  * Accept display :0 and :0.0 when looking for the right AUTHORITY file.
+    Closes: #550546
+  * Added patch to make acpi_fakekey correctly send all key events, even for
+    keys not available on the keyboard by sending keys through uinput.
+    Closes: #373660 - Thanks to: Thomas Jaeger <ThJaeger@gmail.com>
+  * Patched toggleAllWirelessStates for the latest change in the rfkill
+    /sys interface as well.
+
+ -- Michael Meskes <meskes@debian.org>  Mon, 16 Nov 2009 15:39:27 +0100
+
+acpi-support (0.123-1) unstable; urgency=low
+
+  * New upstream version:
+    events/asus-volume-{up,down,mute}: drop, these are handled in the kernel
+    input layer now
+  * Removed some bashisms, closes: #530037
+
+ -- Michael Meskes <meskes@debian.org>  Thu, 28 May 2009 15:46:50 +0200
+
+acpi-support (0.122-2) unstable; urgency=low
+
+  * Delete files even if we upgrade from an older version, closes: #527836
+
+ -- Michael Meskes <meskes@debian.org>  Sat, 09 May 2009 21:51:41 +0200
+
+acpi-support (0.122-1) unstable; urgency=low
+
+  * New upstream version:
+    * sleep.sh, hibernate.sh:
+      - Don't use custom suspend/hibernate solution. Instead, call pm-utils,
+        closes: #506549
+    * prepare.sh, resume.sh, resume.d, suspend.d:
+      - Delete; no longer used
+  * Removed obsolete config files if they are unchanged.
+  * Removed vbesave as it is not used anymore, closes: #497904
+  * Also removed suspend config files.
+  * Still offer the deleted old suspend/resume stuff as examples.
+  * Simplified default file accordingly.
+  * Made screenblank honor LOCK_SCREEN setting, closes: #510209
+
+ -- Michael Meskes <meskes@debian.org>  Tue, 05 May 2009 10:00:09 +0200
+
+acpi-support (0.121-1) unstable; urgency=low
+
+  * New upstream version:
+    * Correct suspend.d/55-down-interfaces.sh to point to
+      /var/run/network/ifstate rather than /etc/network/run/ifstate.
+    * Drop events/asus-mail: On newer Asus, like the eeePc, this is an
+      ACPI event generated by pulling out the power chord, not pressing
+      a mail key. The latter should be handled by hal-info now; if you
+      have an Acer laptop with a mail key, please report a bug against
+      hal-info, closes: #516662
+    * Drop acpi_fakekey translations for keys that are correctly handled
+      in the kernel input layer:
+      - events/ibm-sleepbtn
+      - events/ibm-lockbtn, thinkpad-lockorbattery.sh
+      - events/ibm-hibernatebtn
+      - events/lenovo-lockbtn
+      - events/ibm-videobtn, closes: #456778, #515794
+      - events/thinkpad-mute, always-mute.sh
+      - events/thinkpad-volume-down
+      - events/thinkpad-volume-up
+      - events/thinkpad-thinklight, thinkpad-thinklight.sh
+      - events/tosh-brightness-up
+      - events/tosh-brightness-down, toshbright.sh
+      - events/tosh-mute
+      - events/tosh-sleep
+      - events/sony-hibernate
+      - events/sony-brightness-up, events/sony-brightness-down, sonybright.sh
+      - events/thinkpad-brightness-down, events/thinkpad-brightness-up,
+        thinkpad-brightness-up.sh, thinkpad-brightness-down.sh
+    * Also drop events/thinkpad-zoom, thinkpad-zoom.sh because this key
+      isn't working correctly with or without this script and should be
+      fixed up in hal.
+  * Simplified packaging.
+  * Do not install 90-hdparm.sh four times, closes: #509588
+  * Thinkpad_acpi.modprobe was removed upstream because it is said to be not
+    needed anymore, closes: #518570
+  * Restore old scripts that were incorrectly merged, closes: #524986
+  * Made getXuser() use pinky instead of w, closes: #502141, #510619, #515784
+  * Added patch to adjust panabright.sh for new panasonic_laptop driver that
+    uses /sys instead of /proc, closes: #524838, #524841
+  * Deconfigure wireless devices before powering them down, closes: #496570
+  * Fixed incorrect variable usage in madwifi handling, closes: #501607
+  * Clarified documentation about acpi-support method, closes: #484934, #497377
+  * Recognize 901 as an EeePC as well, closes: #504012
+  * Added a sync call to suspendorhibernate, closes: #503320
+  * Also check for KDE4 powerdevil in CheckPolicy, closes: #520669
+  * Added real package console-tools to dependency on virtual package
+    console-utilities.
+  * Made all scripts use invoke-rc.d where possible.
+
+ -- Michael Meskes <meskes@debian.org>  Wed, 22 Apr 2009 12:53:08 +0200
+
+acpi-support (0.114-1) unstable; urgency=low
+
+  * Took over package for pkg-acpi. Closes: #522683
+  * Bumped Standards-Version to 3.8.1.
+  * Adapted fall back strategy for acpid powerbutton handling. If the old file
+    is still around we will use it. Closes: #522306
+  * Make sure xfce4 power manager is recognized too. Closes: #524074, #524075
+  * Check for 1000H as well in EeePC check. Closes: #515707
+  * New upstream version: Closes: #448673
+    * The rfkill interface has changed again in the 2.6.27 release(!), so
+      play catch-up once more.
+    * lib/state-funcs: add support for checking the new /sys/class/rfkill
+      interface for toggling wireless antennas.  LP: #267875
+    * acpi-support.docs:  Add installation of README
+    * control:  Add laptop-mode-tools to Suggests
+    * Add installation for ac.d/ and battery.d/ directories.
+      (LP: #274599)
+    * wireless.sh: Fix obviously wrong typo in function call name -
+      toggleWirelessStates is a non-existant function
+      (LP: #108897, deb #430895)
+    * Fix asus brightness hotkeys so lowest/highest brightness recognized
+      (LP: #76593)
+    * lib/IBM.config:  Change VBE state and POST_VIDEO for 1834's
+      (LP: #40621, #211285)
+    * Incorporate a portion of the changes from Debian, as detailed below.
+      Debian has been accumulating valuable fixes and structural changes for
+      some years, but it will take some time to digest all of them.
+    * Let laptop-mode-tools run properly (closes LP: #250938)
+      - power.sh: remove laptop-mode invocations, should be handled by pm-utils
+      - acpi-support: remove SPINDOWN_TIME, should be controlled by laptop-mode
+
+ -- Michael Meskes <meskes@debian.org>  Wed, 15 Apr 2009 15:11:37 +0200
+
+acpi-support (0.109-11) unstable; urgency=high
+
+  * Fix postinst to not remove thinkpad_acpi.modprobe. Closes: #514278
+  * Fix tests in postinst that are supposed to match on upgrade only to
+    not match on initial install (when $2 is empty).
+
+ -- Raphael Hertzog <hertzog@debian.org>  Fri, 06 Feb 2009 09:09:28 +0100
+
+acpi-support (0.109-10) unstable; urgency=low
+
+  * Fix default settings for Thinkpad R50e 1834. Closes: #507927
+
+ -- Raphael Hertzog <hertzog@debian.org>  Fri, 12 Dec 2008 16:33:12 +0100
+
+acpi-support (0.109-9) unstable; urgency=low
+
+  * Fix fix on broken getXuser so that it only takes the first
+    line of output from w -hs that matches  (Closes: #497999)
+
+ -- Bart Samwel <bart@samwel.tk>  Mon, 08 Sep 2008 20:42:41 +0200
+
+acpi-support (0.109-8) unstable; urgency=low
+
+  * Fix broken getXuser (Closes: #497999)
+
+ -- Bart Samwel <bart@samwel.tk>  Sun, 07 Sep 2008 10:19:26 +0200
+
+acpi-support (0.109-7) unstable; urgency=low
+
+  * Reported in #497220: CheckPolicy() now calls getXconsole instead of
+    getXuser, as it should.
+  * getXuser() now uses "w" to determine the X user. The old code used
+    finger, but this was highly unreliable. (Closes: #497220)
+  * Added missing 'policy-funcs' include to hibernatebtn.sh (Closes: 
+    #497125)
+  * scripts in /etc/acpi no longer test files from acpi-support-base
+    to see if they should run (Closes: #497801)
+  * Always consider a dbus-send call for a suspend method failed if 
+    dbus-send returns an error code (Closes: #496911)
+
+ -- Bart Samwel <bart@samwel.tk>  Thu, 04 Sep 2008 20:00:27 +0200
+
+acpi-support (0.109-6) unstable; urgency=high
+
+  * /etc/acpi/events/sleepbtn: /etc/acpi/events/sleepbtn runs wrong
+    script (Closes: #489465)
+  * /etc/acpi/battery.d is ignored on newer kernels (Closes: #491396)
+  * Incorrect D-BUS HAL call in dbus-hal suspend method (Closes:
+    #488937)
+
+ -- Bart Samwel <bart@samwel.tk>  Tue, 19 Aug 2008 21:39:41 +0200
+
+acpi-support (0.109-5) unstable; urgency=low
+
+  * Make suspendorhibernate script executable.
+
+ -- Bart Samwel <bart@samwel.tk>  Sun, 22 Jun 2008 23:11:52 +0200
+
+acpi-support (0.109-4) unstable; urgency=low
+
+  * Bashisms of the form '. script args' (Closes: #485435)
+  * Use legacy suspend mode by default for existing setups (but not for 
+    new ones) . (Closes: #485564)
+  * Do not send fake keys to user interface for /etc/acpi/sleep.sh and
+    /etc/acpi/hibernate.sh calls, only for button presses.
+    (Closes: #484901)
+
+ -- Bart Samwel <bart@samwel.tk>  Sun, 22 Jun 2008 23:01:32 +0200
+
+acpi-support (0.109-3) unstable; urgency=low
+
+  * /usr/share/acpi-support/screeblank returns 0 before blanking the
+    screen (Closes: #483015)
+
+ -- Bart Samwel <bart@samwel.tk>  Sun, 22 Jun 2008 22:43:13 +0200
+
+acpi-support (0.109-2) unstable; urgency=low
+
+  * Reinstate thinkpad_acpi.modprobe to fix "Many Thinkpad X60 keys stop
+    working" (Closes: #481253)
+  * Fix incorrect usage of getXconsole instead of getXuser in lid.sh
+    (Closes: #481534)
+  * toshset, nvclock moved to Recommends instead of Depends (Closes: #410918,
+    #434566, #438665, #445900 #457387)
+  * Deprecate built-in suspend/hibernate handling in favor of dbus
+    calls.
+  * Support suspend/hibernate handling by dbus calls to a power
+    management daemon or HAL, calling the pm-utils package, calling the
+    hibernate package, or using the legacy built-in suspend/hibernate support.
+    By default, send keys to the known power management daemons, or if they
+    are not running, fall back to use dbus to a power management daemon,
+    dbus directly to HAL, and direct calls to pm-utils.
+  * Add Recommends for hal, pm-utils, dbus.
+  * Ignore errors in 90-hdparm.sh while detecting if APM is supported,
+    since not all drives support the HDIO_GET_IDENTITY operation.
+    (Closes: #481685)
+  * lid.sh doesn't give lid.sh.pre a chance to abort the close (Closes:
+    #482708)
+  * Replace dependency on console-tools by console-utilities, which is a
+    virtual package that allows kbd | console-tools. (Closes: #481173)
+  * Installation Fails if /proc/acpi/event Not Present (Closes: #481312)
+  * Set DM-Upload-Allowed field to yes.
+
+ -- Bart Samwel <bart@samwel.tk>  Sun, 25 May 2008 18:17:46 +0200
+
+acpi-support (0.109-1) unstable; urgency=low
+
+  * New upstream release 0.109 (Ubuntu Hardy) [no relevant changes].
+  * New upstream release 0.108 (Ubuntu Hardy) [no relevant changes].
+  * New upstream release 0.107 (Ubuntu Hardy):
+    * "lib/FUJITSU SIEMENS.config": Fix typo, which caused failures on Fujitsu
+      notebooks (LP: #203452)
+  * New upstream release 0.106 (Ubuntu Hardy):
+    * Add events/asus-video to support asus switch video hotkey; patch from
+      Nicolò Chieffo (LP: #138228)
+    * Fix the value range in sonybright.sh (0-7 instead of 1-8); patch from
+      unggnu (LP: #136380)
+    * "lib/FUJITSU SIEMENS.config":
+      - Enable suspend for Fujitsu-Siemens C1110 (LP: #52970)
+      - Enable STR for Fujitsu-Siemens Lifebook S7020, S7110
+    * events/asus-*: Fix event key names for ASUS (HOTK); patch from
+      Jeroen van der Vegt (LP: #25784)
+    * Fix names in comments for events/panasonic-{mute,volume-down,volume-up}    
+    * Drop thinkpad_acpi.modprobe: the workarounds therein are not needed for
+      thinkpad_acpi in Hardy anymore; investigations by Jerone Young
+      (LP: #194679) [ Note from Bart Samwel: Therefore probably not needed in
+      current Debian kernels either. ]
+  * New upstream version 0.105 (from Ubuntu Hardy):
+    * Fix screenblank for KDE by using a dcop call
+  * Add HOTK key names in events/asus-* for more keys than provided by the
+    upstream.
+  * Remove extra non-owned files on purge. Closes: #455012
+  * Call old acpid power button handler /etc/acpi/powerbtn.sh if present.
+    Closes: #461311
+  * Support "operstate" power state file for madwifi drivers. Closes: #453706.
+  * Support operstate, rf_kill and power/state to determine if wireless is
+    powered on. Closes: #463719.
+  * Support asus-laptop module as well as asus-acpi module for setting the
+    wireless LED. Closes: #453856.
+  * As a fallback, detect X instances that were not started on a vt.
+    Closes: #462954.
+  * Add missing checks that acpi-support is installed to some of the config
+    scripts. Closes: #469556.
+  * Remove Default-Stop entries from vbesave init script, since the script
+    doesn't do anything when it's stopped. Closes: #461441.
+  * Check that a drive supports APM before using hdparm -B on it.
+    Closes: #458787.
+  * Divert sleep button to sleep.sh if power management daemons are not
+    running, for thinkpad, panasonic, sony and toshiba laptops.
+    Closes: #467374, 373660.
+  * Stop laptop mode early in the suspend/hibernate process, and start it late
+    at resume time. This fixes suspend/resume problems on at least one machine.
+    Closes: #458437.
+  * Config option USE_HIBERNATE_PACKAGE=true will now instruct acpi-support to
+    delegate sleeping and hibernation to the "hibernate" package.
+    Closes: #426934, #405563.
+  * Check if we can actually open event device in acpi_fakekey. Closes: #410478.
+  * Support Asus R1F tablet screen rotation. Kudos to Antonio Trueba.
+    Closes: #450531.
+  * Remove /etc/acpi/resume.d/49-915-resolution-set.sh. It will be moved to
+    the 915resolution package. Closes: #447742, #467347.
+  * Don't misinterpret Asus Eee PC hotkeys as brightness keys. Closes: #459328.
+  * Support Asus Eee PC volume up/down and mute keys. Closes: #459326.
+  * Get rid of extra quotes in asus-wireless.sh.
+  * Fix handling of ${shlibs:Depends} in control file (it wasn't generated in
+    the rules file).
+  * Move radeontool to Recommends. (This is possible because radeontool is in
+    task "laptop" now.)
+  * Once again got rid of some bash dependencies. Closes: #453861.
+  * Be able to detect X user when X has been started using startx. Thanks to
+    Csaba Halasz for the patch. Closes: #471510.
+  * Call wpa_action stop for wpasupplicant-controlled interfaces before suspend.
+    Closes: #473184.
+  * Correctly bring up logical interfaces on resume. Closes: #475002.
+  * Instead of restarting Network Manager on suspend, call its sleep and wakeup
+    events. Closes: #477917.
+  * Add console-tools to depends of acpi-support-base, since we use fgconsole in
+    power-funcs.
+  * Fix dcop call in CheckPolicy to pass the X user. Closes: #480033.
+  * Let acpi-support depend on exact version of acpi-support-base.
+
+ -- Bart Samwel <bart@samwel.tk>  Mon, 12 May 2008 17:10:00 +0200
+
+acpi-support (0.103-5) unstable; urgency=low
+
+  [ Bart Samwel ]
+  * Don't do exit in 90-hdparm.sh, it exits the whole resume/startup process.
+    Closes: #453478.
+  * Read laptop-mode.conf better in 90-hdparm.sh. Closes: #452489.
+  * Set hdparm -B 128 while on battery in 90-hdparm.sh. Head parking is useful
+    on the road for shock protection. Still set hdparm -B 254 while on AC.
+  * Listen on a wider range of battery and ac events (required on some
+    laptops).
+
+  [ Raphael Hertzog ]
+  * Updated Standards-Version to 3.7.3 (no change).
+  * Wrap some changelog lines to please lintian.
+  * Fix dh_gencontrol invocation to pass "-pacpi-support" before "--".
+
+ -- Raphael Hertzog <hertzog@debian.org>  Thu, 13 Dec 2007 20:27:24 +0100
+
+acpi-support (0.103-4) unstable; urgency=low
+
+  * acpi-support-base now Replaces acpi-support (<= 0.103-2).
+    Closes: #451748.
+  * Fix checks for existing handlers in powerbutton handler. Closes: #451803
+  * Restart laptop-mode after resume, so all of the hardware settings are
+    reapplied.
+
+ -- Bart Samwel <bart@samwel.tk>  Sun, 18 Nov 2007 10:36:29 +0200
+
+acpi-support (0.103-3) unstable; urgency=low
+
+  * Rebuild as Debian native package because we diverged too much from Ubuntu.
+    This ensures that the source tarball corresponds really to what's in SVN
+    and won't reintroduce deleted files. Closes: #451568, #451569
+
+ -- Raphael Hertzog <hertzog@debian.org>  Sat, 17 Nov 2007 20:18:29 +0100
+
+acpi-support (0.103-2) unstable; urgency=low
+
+  [ Bart Samwel ]
+  * getXconsole returns wrong DISPLAY="0\n0" (Closes: #437940)
+  * powerbtn handler missing (Closes: #433877)
+  * Asus wireless card on/off button fix (Closes: #410952)
+  * Restore screen brightness on certain Asus laptops (Closes: #448134)
+  * Split off power button support into acpi-support-base.
+  * Set hdparm power management to 254 for all hard drives. (Closes: #448673)
+  * Don't check executable flags on /etc/acpi/suspend.d and /etc/acpi/resume.d
+    scripts. (Closes: #447571)
+  * Attempt to fix brightness keys for Sony fr215 laptop (Closes: #446056)
+  * Support KDE screensaver for screen blanking (Closes: #446516)
+  * Listen for Fn+F5 and Fn+F6 again on thinkpads (Closes: #446647)
+  * Fix incorrect reference to module sbs in resume.d/72-acpi-pain.sh
+    (Closes: #447085)
+
+  [ Raphael Hertzog ]
+  * Add descriptions to LSB headers in init scripts (fix lintian warnings).
+
+ -- Raphael Hertzog <hertzog@debian.org>  Thu, 15 Nov 2007 11:45:41 +0100
+
+acpi-support (0.103-1) unstable; urgency=low
+
+  * New upstream version 0.96 (from Ubuntu Gutsy):
+    * ibm-acpi has been renamed to thinkpad-acpi. Rename options file
+      accordingly. (Closes: #434845)
+  * New upstream version 0.96-ubuntu1 (from Ubuntu Gutsy):
+    * Build packages for lpia as well.
+  * New upstream version 0.97 (from Ubuntu Gutsy):
+    * Improve X display finding
+    * Switch Thinkpad wireless hotkey control back to firmware for now
+    * Improve Toshiba wireless handling
+    * Check fragment scripts are executable
+    * Improve Panasonic support
+    * Improve state saving/restoring over suspend/resume
+    * Add Asus brightness key support
+    * Alter some dependencies to recommends
+    * Fix init script to check state on boot
+    * Depend on the appropriate shlibdeps
+    * Add a postrm to tidy up the init scripts
+    * We no longer need to stop mysql
+    * Tidy up scripts so a few errors aren't produced
+    * Update sony brightness script to handle sony-laptop  
+  * New upstream version 0.98 (from Ubuntu Gutsy):
+     * Add support for the video toggle hotkey
+  * New upstream version 0.99 (from Ubuntu Gutsy):
+    * prepare.sh: Fix missing space in executability test.
+  * New upstream version 0.100 (from Ubuntu Gutsy):
+    * send events on ACPI brightness presses
+  * New upstream version 0.101 (from Ubuntu Gutsy):
+    * Switch Thinkpad to using ACPI events for magic keys so that
+      'thinkpad-keys' can go away and save us all from the new Lenovopad
+      slow NVRAM.
+    - See 'hotkey-setup' for remapping and initial module loading + setup.
+    * Extend mask used in 'thinkpad_acpi.modprobe'.
+  * New upstream version 0.102 (from Ubuntu Gutsy):
+    * Poke thinkpad-keys on CMOS notification 
+  * New upstream version 0.103 (from Ubuntu Gutsy):
+    * Replace call to 'thinkpad-keys-update' with "thinkpad-keys --update"
+    * Remove wireless-related comment gruff from 'thinkpad-cmos' event.  
+  * Use nvclock instead of smartdimmer for setting LCD brightness on Sony
+    laptops. (Closes: #430491)
+  * Call the correct function in wireless.sh to toglle wireless states.
+    (Closes: #430895)
+  * Correctly detect keyboard event device in acpi_fakekey. (Closes: #433771)
+  * Add LSB dependency info to acpi-support and vbesave init scripts.
+    (Closes: #432020)
+  * Fix a problem in power-funcs (getXconsole function), which didn't work when
+    COLUMNS was set. (Closes: #437141)
+  * Press LEFT SHIFT (using acpi_fakekey) after unblanking the screen when the
+    lid is opened. (Closes: #374069)
+  * Fix path to backlight control file for sony laptops, from upstream version
+    0.97. (Closes: #424004)
+  * Honor DEB_BUILD_OPTIONS=nostrip. (Closes: #436370)
+  * Document thinkpad_acpi options in thinkpad_acpi.modprobe. (Closes: #438430)
+  * Send SIGHUP to ksysguardd on resume so that it reopens its files in
+    /proc/acpi. (Closes: #421017)
+  * Correct directory existence check in power.sh. (Closes: #430494)
+  * Perform error checking for vbetool. (Closes: #445213)
+  * Reduced dependency on xbase-clients to x11-xserver-utils. (Closes: #438665)
+  
+ -- Bart Samwel <bart@samwel.tk>  Sun, 07 Oct 2007 11:15:00 +0200
+
+acpi-support (0.95-2) unstable; urgency=low
+
+  * Remove spurious file acpi-support_0.90-2.diff.gz added in the repository
+    during last merge (it's still in the orig.tar.gz though).
+  * Add a new SKIP_INTERFACES variables in /etc/default/acpi-support and use
+    it to define network interfaces that are not tied to hardware to avoid
+    shutting them down during suspend.
+  * Properly remove files that have been removed in the SVN in the clean
+    target. This is required because the files are still present in the
+    .orig.tar.gz file (otherwise autobuilder builds will have the unwanted
+    files).
+  * Add XS-Vcs-* fields in debian/control.
+
+ -- Raphael Hertzog <hertzog@debian.org>  Fri, 15 Jun 2007 21:34:42 +0200
+
+acpi-support (0.95-1) unstable; urgency=low
+
+  [ Bart Samwel ]
+  * New upstream versions (from Ubuntu Feisty and Gutsy).
+    * 0.95: Clean up issues with toggling multiple wireless cards.
+      - Move variable initiation into loop inside 'wireless.sh'
+      - Move contents of 'wireless.sh' into 
+        lib/state-funcs:toggleAllWirelessState()
+      - Update '{ibm,tosh,asus}-wireless.sh' to use state-funcs
+    * 0.95: Remove spurious 'echo HERE' from lib/state-funcs.  D'oh.
+    * 0.94: Save and restore values that the kernel does not preserve across
+      suspend/resume and hibernate/resume:
+      - /sys/class/net/eth*/device/rf_kill
+      - /proc/acpi/ibm/bluetooth
+      - /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
+    * 0.94: White list Lenovo ThinkPad Z60m as working suspend.
+    * 0.93: Change 'wireless.sh' to use 'device/rf_kill' for wireless
+      devices (if available) in preference to 'device/power/state' which
+      has been removed by the upstream kernel developers.
+    * 0.93: Teach 'lib/state-funcs:isAnyWirelessPoweredOn( )' to also check
+      'device/rf_kill' if it's available.
+    * 0.93: Change 'ibm-wireless.sh' to rotate wireless and bluetooth states
+    * 0.93: Correct inverted logic in 'isAnyWirelessPoweredOn()'.
+    * 0.93: Change script shebangs to use '/bin/sh' instead of '/bin/bash'.
+    * 0.92: Add 'events/sony-eject' for Sony Vaio TX3.
+  * Stop pretending to control laptop-mode-tools, which
+    only works (and badly too) in the upstream Ubuntu version. The lmt
+    package provides its own acpi bindings. Add reference in config file
+    to laptop-mode-tools as a replacement for the current non-working
+    configuration option. (Closes: #425800)
+  * Change Recommends of laptop-mode-tools to Suggests. This should prevent
+    automatic enabling of laptop mode for unsuspecting users, it should not
+    be installed by default.
+  * Check that acpi-support is still installed in script configuration files.
+    (Closes: #424752)
+  * Change order of PCI video state restoration so that it is always the last
+    to be saved and the first to be restored. (Closes: #396897)
+  * Only use ifup/ifdown for interfaces listed by /etc/network/run/ifstate.
+    For other interfaces that are up, use "ifconfig down" to force them down,
+    and restart network-manager and ifplugd after resume to bring them back up.
+    (Closes: #373659)
+  * Do not ifup/down "lo" and "dummy..." interfaces over suspend.
+    (Closes: #427128)
+  * Removed bash dependencies. (Note that this may break custom scripts in
+    /etc/acpi that contain bashisms, as the scripts are sourced, not just
+    executed.) (Closes: #407510)
+  * Instead of only restoring the hardware clock on resume, stop and start the
+    hwclock.sh service over suspend. (Closes: #389537)
+  * Move radeontool call out of loop in lid.sh. (Mentioned in bug 391498, but
+    does not solve the bug.)
+  * Potential fix for "sometimes lid.sh doesn't work" bug. (Part of bug 391498,
+    but not enough to close it.)
+  * Bump up Debhelper compatibility level to 5.
+  * Remove useless use of grep in asus-touchpad.sh.
+
+  [ Raphael Hertzog ]
+  * Mark Bart as Maintainer.
+  * Put myself in Uploaders instead.
+  * Sponsor upload for Bart. Change version to 0.95-1.
+  * Manually remove (or move out of the way) old scripts in postint. Concerns:
+    - /etc/acpi/suspend.d/80-video-pci-state.sh
+    - /etc/acpi/resume.d/49-855-resolution-set.sh
+    - /etc/acpi/resume.d/13-855-resolution-set.sh
+    - /etc/modprobe.d/toshiba_acpi.modprobe
+  * Documents policy for handling obsolete configuration files in
+    README.Debian.
+
+ -- Raphael Hertzog <hertzog@debian.org>  Thu, 14 Jun 2007 21:52:16 +0200
+
+acpi-support (0.90-4) unstable; urgency=low
+
+  * Change logic of isAnyWirelessPoweredOn() to only succeed if one wireless
+    device with support for reporting a "state" in sysfs is turned on;
+    closes: #410402.
+  * Add myself as uploader.
+  * Install new manpage for acpi_fakekey, thanks Nico Golde; closes: #383365.
+  * Call dh_strip to drop the ELF comment section of acpi_fakekey.
+  * Depend on radeontool on all arches.
+
+ -- Loic Minier <lool@dooz.org>  Sun, 11 Feb 2007 19:48:22 +0100
+
+acpi-support (0.90-3) unstable; urgency=low
+
+  * Disable VESA BIOS Extensions (VBE) state saving / restoring for X60s
+    Thinkpads (models 1702*, 1704*); closes: 407188.
+
+ -- Loic Minier <lool@dooz.org>  Fri, 19 Jan 2007 22:57:56 +0100
+
+acpi-support (0.90-2) unstable; urgency=low
+
+  * Invoke /usr/sbin/s2disk instead of /sbin/s2disk; thanks Jan Luebbe.
+  * Don't pass any arguments to s2disk as it doesn't support these in newer
+    uswsusp versions.
+  * Fix "APCI" instead of "ACPI" typo in IBM.config; thanks Joshua Kwan;
+    closes: #389511.
+
+ -- Loic Minier <lool@dooz.org>  Sun, 22 Oct 2006 19:15:00 +0200
+
+acpi-support (0.90-1) unstable; urgency=low
+
+  * New upstream versions (from Ubuntu Edgy).
+    * 0.90: Explicitly switch the screen back to text mode if it was that way
+            before resume.
+    * 0.89: Add support for high-res uswsusp
+    * 0.88: Change defaults
+    * 0.87: Add support for using uswsusp
+  * Conflict with uswsusp <= 0.2 as well.
+
+ -- Loic Minier <lool@dooz.org>  Sat, 21 Oct 2006 12:59:06 +0200
+
+acpi-support (0.86-1) unstable; urgency=low
+
+  * New upstream version (from Ubuntu Edgy).
+    * 0.86: Remove stop links from rc0 and rc6
+    * 0.85: Don't unload nsc-ircc on suspend
+  * Add ${shlibs:Depends} and call to dh_shlibdeps. Closes: #383449
+  * 855resolution is no more in Debian, replaced by 915resolution. 
+    Closes: #381210
+  * Improved description, thanks to Clément Stenac. Closes: #383691
+  * Removed README.toshiba which doesn't apply to Debian (or which doesn't
+    apply any more, the toshiba_acpi option indicated doesn't exist in
+    2.6.17.7). Closes: #383326
+
+ -- Raphael Hertzog <hertzog@debian.org>  Sun, 20 Aug 2006 10:43:59 +0200
+
+acpi-support (0.84-1) unstable; urgency=low
+
+  * New upstream version.
+  * Put laptop-mode-tools in Recommends instead of Depends to not force the
+    user to use it: it can be painful to have to wait for the disk to spin up
+    and the gain is not always worth it with recent (very small) hard-disks.
+  * Add upstream changelog.
+
+ -- Raphael Hertzog <hertzog@debian.org>  Fri, 16 Jun 2006 17:51:06 +0200
+
+acpi-support (0.80-1) unstable; urgency=low
+
+  * Initial release.
+  * Add a watch file.
+  * Little fixes for lintian compliancy.
+
+ -- Raphael Hertzog <hertzog@debian.org>  Mon, 15 May 2006 00:02:44 +0000
--- acpi-support-0.142.orig/debian/compat
+++ acpi-support-0.142/debian/compat
@@ -0,0 +1 @@
+7
--- acpi-support-0.142.orig/debian/control
+++ acpi-support-0.142/debian/control
@@ -0,0 +1,60 @@
+Source: acpi-support
+Section: admin
+Priority: optional
+Maintainer: Debian Acpi Team <pkg-acpi-devel@lists.alioth.debian.org>
+Uploaders: Michael Meskes <meskes@debian.org>
+Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.40),
+	libsystemd-daemon-dev [linux-any], dh-systemd (>= 1.5), pkg-config
+Vcs-Git: git://anonscm.debian.org/pkg-acpi/acpi-support.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-acpi/acpi-support.git
+Standards-Version: 3.9.5
+
+Package: acpi-support
+Architecture: all
+Depends: acpi-support-base (>= 0.109-1), x11-xserver-utils, acpid (>= 1.0.4),
+	lsb-base (>= 1.3-9), pm-utils, ${arch:Depends},
+	${misc:Depends}
+Recommends: rfkill, acpi-fakekey
+Suggests: radeontool, vbetool, xinput, 
+	xscreensaver|gnome-screensaver|kscreensaver|xautolock|xlock|xtrlock|i3lock,
+	${arch:Suggests}
+Breaks: uswsusp (<= 0.2)
+Description: scripts for handling many ACPI events
+ This package contains scripts to react to various ACPI events. It only
+ includes scripts for events that can be supported with some level of
+ safety cross platform.
+ .
+ It is able to:
+  * Detect loss and gain of AC power, lid closure, and the press of a
+    number of specific buttons (on Asus, IBM, Lenovo, Panasonic, Sony
+    and Toshiba laptops).
+  * Suspend, hibernate and resume the computer, with workarounds for 
+    hardware that needs it.
+  * On some laptops, set screen brightness.
+ .
+ Besides some system tools acpi-support recommends vbetool to be able to power
+ off the screen and some screensavers to be able to lock the screen on lid
+ close.
+
+Package: acpi-support-base
+Architecture: all
+Depends: acpid (>= 1.0.4), ${misc:Depends}
+Suggests: acpi-support, consolekit
+Replaces: acpi-support (<< 0.109-1)
+Description: scripts for handling base ACPI events such as the power button
+ This package contains scripts to react to various base ACPI events
+ such as the power button. For more extensive ACPI support, including support
+ for suspend-to-RAM and for various laptop features, install the package
+ "acpi-support".
+
+Package: acpi-fakekey
+Architecture: i386 amd64 ia64
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Replaces: acpi-support (<< 0.136-1)
+Breaks: acpi-support (<< 0.136-1)
+Description: tool to generate fake key events
+ This package contains a small tool that can be used to generate key events as
+ if the corresponding key was pressed. It is used by scripts processing ACPI
+ events to translate these events to key presses but can also be used
+ separately.
+
--- acpi-support-0.142.orig/debian/copyright
+++ acpi-support-0.142/debian/copyright
@@ -0,0 +1,24 @@
+This package written and debianised for Ubuntu by Thom May
+<thom@canonical.com> based on work by Matthew Garrett
+<mjg59@srcf.ucam.org>. It was downloaded from
+http://archive.ubuntu.com/ubuntu/pool/main/a/acpi-support/
+
+Copyright (C) 2004 Canonical Ltd.
+ Authors: Matthew Garrett, Thom May
+
+acpi-support is licensed under the GNU general public license, version 2
+
+acpi-support is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2, or (at your option) any later version.
+
+acpi-support is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+acpi-support; see the file COPYING.  If not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+On Debian systems, a copy of the GNU General Public License is available in
+/usr/share/common-licenses/GPL-2 as part of the base-files package.
--- acpi-support-0.142.orig/debian/examples/acpi/ac.d/90-hdparm.sh
+++ acpi-support-0.142/debian/examples/acpi/ac.d/90-hdparm.sh
@@ -0,0 +1,41 @@
+#! /bin/sh
+#
+# This script adjusts hard drive APM settings using hdparm. The hardware
+# defaults (usually hdparm -B 128) cause excessive head load/unload cycles
+# on many modern hard drives. We therefore set hdparm -B 254 while on AC
+# power. On battery we set hdparm -B 128, because the head parking is
+# very useful for shock protection.
+#
+
+. /usr/share/acpi-support/power-funcs
+
+DO_HDPARM=y
+if [ -e /usr/sbin/laptop_mode ] ; then 
+  LMT_CONTROL_HD_POWERMGMT=$(. /etc/laptop-mode/laptop-mode.conf && echo "$CONTROL_HD_POWERMGMT")
+  if [ "$LMT_CONTROL_HD_POWERMGMT" != 0 ] \
+     && [ -e /var/run/laptop-mode-tools/enabled ]
+  then
+    # Laptop mode controls hdparm -B settings, we don't.
+    DO_HDPARM=n
+  fi
+fi
+
+if [ "$DO_HDPARM" = y ] ; then
+  # Get the power state into STATE
+  getState;
+  
+  for dev in /dev/sd? /dev/hd? ; do
+    if [ -b $dev ] ; then
+      # Check for APM support; discard errors since not all drives
+      # support HDIO_GET_IDENTITY (-i).    
+      if hdparm -i $dev 2> /dev/null | grep -q 'AdvancedPM=yes' ; then
+	if [ "$STATE" = "BATTERY" ] ; then
+	  hdparm -B 128 $dev
+	else
+	  hdparm -B 254 $dev
+	fi
+      fi
+    fi
+  done
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/battery.d/90-hdparm.sh
+++ acpi-support-0.142/debian/examples/acpi/battery.d/90-hdparm.sh
@@ -0,0 +1,41 @@
+#! /bin/sh
+#
+# This script adjusts hard drive APM settings using hdparm. The hardware
+# defaults (usually hdparm -B 128) cause excessive head load/unload cycles
+# on many modern hard drives. We therefore set hdparm -B 254 while on AC
+# power. On battery we set hdparm -B 128, because the head parking is
+# very useful for shock protection.
+#
+
+. /usr/share/acpi-support/power-funcs
+
+DO_HDPARM=y
+if [ -e /usr/sbin/laptop_mode ] ; then 
+  LMT_CONTROL_HD_POWERMGMT=$(. /etc/laptop-mode/laptop-mode.conf && echo "$CONTROL_HD_POWERMGMT")
+  if [ "$LMT_CONTROL_HD_POWERMGMT" != 0 ] \
+     && [ -e /var/run/laptop-mode-tools/enabled ]
+  then
+    # Laptop mode controls hdparm -B settings, we don't.
+    DO_HDPARM=n
+  fi
+fi
+
+if [ "$DO_HDPARM" = y ] ; then
+  # Get the power state into STATE
+  getState;
+  
+  for dev in /dev/sd? /dev/hd? ; do
+    if [ -b $dev ] ; then
+      # Check for APM support; discard errors since not all drives
+      # support HDIO_GET_IDENTITY (-i).    
+      if hdparm -i $dev 2> /dev/null | grep -q 'AdvancedPM=yes' ; then
+	if [ "$STATE" = "BATTERY" ] ; then
+	  hdparm -B 128 $dev
+	else
+	  hdparm -B 254 $dev
+	fi
+      fi
+    fi
+  done
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/prepare.sh
+++ acpi-support-0.142/debian/examples/acpi/prepare.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+for SCRIPT in /etc/acpi/suspend.d/*.sh; do
+    if [ -x $SCRIPT ] ; then
+	. $SCRIPT
+    fi
+done
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/10-thinkpad-standby-led.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/10-thinkpad-standby-led.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+. /usr/share/acpi-support/state-funcs
+setLEDThinkpadSuspending 1
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/11-video-pci-restore.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/11-video-pci-restore.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Restore video PCI state
+if [ x$SAVE_VIDEO_PCI_STATE = xtrue ]; then
+  for x in /sys/bus/pci/devices/*; do
+    if [ -f /var/run/vga-pci-`basename $x` ]; then
+        cat /var/run/vga-pci-`basename $x` >$x/config;
+    fi
+  done
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/13-855-resolution-set.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/13-855-resolution-set.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [ -x /usr/sbin/855resolution ]; then
+    . /etc/default/855resolution
+    if [ "$MODE" != "" ] && [ "$XRESO" != "" ] && [ "$YRESO" != "" ]; then
+	/etc/init.d/855resolution start;
+    fi
+fi
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/15-video-post.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/15-video-post.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Post the video card
+if [ x$POST_VIDEO = xtrue ]; then
+  vbetool post
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/17-video-restore.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/17-video-restore.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Attempt to restore some video card state
+if [ x$SAVE_VBE_STATE = xtrue ]; then
+  vbetool vbestate restore <$VBESTATE
+  if [ $VBEMODE != "3" ]; then
+    vbetool vbemode set $VBEMODE;
+  else
+    vbetool vgamode set 3;
+  fi
+fi
+
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/35-modules-load.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/35-modules-load.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Increase the firmware loading timeout while we're doing this
+# Otherwise, swap thrash tends to lead to failure to start
+if [ -f /sys/class/firmware/timeout ]; then
+    timeout=`cat /sys/class/firmware/timeout`
+    echo 100 >/sys/class/firmware/timeout
+fi
+
+# Load any drivers that we removed
+for x in $MODULES; do
+    modprobe $x;
+done
+
+# And reset the firmware timeout
+if [ -f /sys/class/firmware/timeout ]; then
+    echo $timeout >/sys/class/firmware/timeout
+fi
+
+# And bring back PCMCIA code
+[ -x /sbin/pccardctl ] && pccardctl insert
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/40-infra-red.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/40-infra-red.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Restart IR if necessary
+if [ -f /var/run/irdadev ] && [ x$RESTART_IRDA = xtrue ]; then
+    rm /var/run/irdadev;
+    /etc/init.d/irda-setup start;
+    /etc/init.d/irda-utils start;
+fi;
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/49-855-resolution-set.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/49-855-resolution-set.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [ -x /usr/sbin/855resolution ]; then
+    . /etc/default/855resolution
+    if [ "$MODE" != "" ] && [ "$XRESO" != "" ] && [ "$YRESO" != "" ]; then
+	/etc/init.d/855resolution start;
+    fi
+fi
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/50-framebuffer-enable.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/50-framebuffer-enable.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# And turn the framebuffer back on
+for x in /sys/class/graphics/*; do
+    if [ -f $x/state ]; then
+        echo -n 0 >$x/state;
+    fi
+done
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/50-tosh-restore-brightness.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/50-tosh-restore-brightness.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ "x$TOSH_BRIGHTNESS" != "x" ]; then
+  # To reset the brightness...
+  echo 'brightness : '$TOSH_MAXBRIGHT > $TOSH_LCD
+  echo 'brightness : 0' > $TOSH_LCD
+  # And then restore it...
+  echo 'brightness : '$TOSH_BRIGHTNESS > $TOSH_LCD
+  unset TOSH_BRIGHTNESS TOSH_MAXBRIGHT
+fi
+
+unset TOSH_LCD
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/55-screen.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/55-screen.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# And make sure that the screen is on
+if [ x$USE_DPMS = xtrue ]; then
+  vbetool dpms on
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/58-proc-sysfs-restore-state.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/58-proc-sysfs-restore-state.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Paul Sladen 2007-03-22
+# Restore saved /sys and /proc states following resume.
+# See suspend.d/??-proc-sysfs-restore-state.sh for details.
+
+if [ -r /var/run/proc-sysfs-save-state ] ; then
+    while read WHERE foo WHAT ; do
+	if [ "x$foo" = "x=" -a -w "$WHERE" ] ; then
+	    echo -n "$WHAT" > "$WHERE"
+	fi
+    done < /var/run/proc-sysfs-save-state
+fi
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/60-asus-wireless-led.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/60-asus-wireless-led.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+test -d /usr/share/acpi-support/state-funcs || exit 0
+
+. /usr/share/acpi-support/state-funcs
+
+if isAnyWirelessPoweredOn ; then
+    setLEDAsusWireless 1
+else
+    setLEDAsusWireless 0
+fi
+
+  
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/62-ifup.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/62-ifup.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Bring up the interfaces. This should probably be left up to some policy
+# manager, but at the moment we just bring back all the ifupdown-managed
+# interfaces that were up at suspend time.
+for x in $IFUP_INTERFACES; do
+    if must_control_interface $x ; then
+        ifup $x &
+    fi
+done
+
+# Wake up NetworkManager
+dbus-send --system --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.wake
+
+# Kick ifplugd to check its interfaces. (Not sure if this is necessary, but it
+# can't hurt either.)
+invoke-rc.d --quiet ifplugd restart
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/65-console.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/65-console.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Some hardware needs another X/console switch in order to bring stuff back
+chvt $CONSOLE;
+if [ x$DOUBLE_CONSOLE_SWITCH = xtrue ]; then
+  chvt 12;
+  chvt $CONSOLE;
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/67-sound.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/67-sound.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Get sound back
+if [ -x /etc/init.d/alsa-utils ]; then
+        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+                invoke-rc.d alsa-utils start
+        else
+		/etc/init.d/alsa-utils start
+        fi
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/69-services.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/69-services.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# we need to restart our services after the network is back
+for x in $STOP_SERVICES; do
+        invoke-rc.d --quiet $x start
+done
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/72-acpi-pain.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/72-acpi-pain.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# Some hardware gets unhappy about button events unless we do this
+modprobe -r button
+modprobe button
+
+# Kick the fans
+modprobe -r fan
+modprobe -r thermal
+modprobe fan
+modprobe thermal
+
+if [ "`grep thinkpad_acpi /proc/modules`" ]; then
+    # No, I don't know why
+    modprobe -r thinkpad_acpi
+    modprobe thinkpad_acpi
+fi
+
+# NNGH FAN HATE
+for x in /proc/acpi/fan/*; do
+    if [ -f "$x/state" ] && [ "`grep on $x/state`" ]; then
+        echo -n 3 > $x/state;
+        echo -n 0 > $x/state;
+    fi
+done
+
+# Make sure that the drive power state is set correctly again
+modprobe -r sbs
+modprobe -r ac
+modprobe ac
+modprobe -r battery
+modprobe battery
+modprobe sbs
+/etc/acpi/power.sh
+
+# Force monitoring processes to reopen their /proc/acpi files after modules
+# have been replaced.
+killall -s HUP ksysguardd
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/89-asus-restore-brightness.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/89-asus-restore-brightness.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Fix for dark password prompt after a resume on some ASUS laptops
+# from https://bugs.launchpad.net/system76/+bug/114675/
+
+if [ -r /proc/acpi/asus/brn ] ; then
+	brtNum=`cat /proc/acpi/asus/brn`
+	echo $brtNum > /proc/acpi/asus/brn
+fi
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/90-hdparm.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/90-hdparm.sh
@@ -0,0 +1,41 @@
+#! /bin/sh
+#
+# This script adjusts hard drive APM settings using hdparm. The hardware
+# defaults (usually hdparm -B 128) cause excessive head load/unload cycles
+# on many modern hard drives. We therefore set hdparm -B 254 while on AC
+# power. On battery we set hdparm -B 128, because the head parking is
+# very useful for shock protection.
+#
+
+. /usr/share/acpi-support/power-funcs
+
+DO_HDPARM=y
+if [ -e /usr/sbin/laptop_mode ] ; then 
+  LMT_CONTROL_HD_POWERMGMT=$(. /etc/laptop-mode/laptop-mode.conf && echo "$CONTROL_HD_POWERMGMT")
+  if [ "$LMT_CONTROL_HD_POWERMGMT" != 0 ] \
+     && [ -e /var/run/laptop-mode-tools/enabled ]
+  then
+    # Laptop mode controls hdparm -B settings, we don't.
+    DO_HDPARM=n
+  fi
+fi
+
+if [ "$DO_HDPARM" = y ] ; then
+  # Get the power state into STATE
+  getState;
+  
+  for dev in /dev/sd? /dev/hd? ; do
+    if [ -b $dev ] ; then
+      # Check for APM support; discard errors since not all drives
+      # support HDIO_GET_IDENTITY (-i).    
+      if hdparm -i $dev 2> /dev/null | grep -q 'AdvancedPM=yes' ; then
+	if [ "$STATE" = "BATTERY" ] ; then
+	  hdparm -B 128 $dev
+	else
+	  hdparm -B 254 $dev
+	fi
+      fi
+    fi
+  done
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/90-thinkpad-unstandby-led.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/90-thinkpad-unstandby-led.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+. /usr/share/acpi-support/state-funcs
+setLEDThinkpadSuspending 0
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/90-xscreensaver.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/90-xscreensaver.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# now, we should poke xscreensaver so you get a dialog
+if pidof xscreensaver > /dev/null; then 
+    d=/tmp/.X11-unix
+    for x in $d/*; do
+	displaynum=${x#$d/X}
+	getXuser;
+	if [ x"$XAUTHORITY" != x"" ]; then
+	    export DISPLAY=":$displaynum"
+	    su "$user" -c "(xscreensaver-command -deactivate)"
+	fi
+    done
+fi
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/95-laptop-mode.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/95-laptop-mode.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+if [ -e /etc/init.d/laptop-mode ] ; then
+	invoke-rc.d laptop-mode restart
+fi
--- acpi-support-0.142.orig/debian/examples/acpi/resume.d/98-acpi-unlock.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.d/98-acpi-unlock.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+#Let acpid process events again
+(sleep 10 && rm /var/lock/acpisleep)&
+
--- acpi-support-0.142.orig/debian/examples/acpi/resume.sh
+++ acpi-support-0.142/debian/examples/acpi/resume.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+# Source from /etc/acpi/resume.d/
+for SCRIPT in /etc/acpi/resume.d/*.sh; do
+    if [ -x $SCRIPT ] ; then
+        . $SCRIPT
+    fi
+done
--- acpi-support-0.142.orig/debian/examples/acpi/start.d/90-hdparm.sh
+++ acpi-support-0.142/debian/examples/acpi/start.d/90-hdparm.sh
@@ -0,0 +1,41 @@
+#! /bin/sh
+#
+# This script adjusts hard drive APM settings using hdparm. The hardware
+# defaults (usually hdparm -B 128) cause excessive head load/unload cycles
+# on many modern hard drives. We therefore set hdparm -B 254 while on AC
+# power. On battery we set hdparm -B 128, because the head parking is
+# very useful for shock protection.
+#
+
+. /usr/share/acpi-support/power-funcs
+
+DO_HDPARM=y
+if [ -e /usr/sbin/laptop_mode ] ; then 
+  LMT_CONTROL_HD_POWERMGMT=$(. /etc/laptop-mode/laptop-mode.conf && echo "$CONTROL_HD_POWERMGMT")
+  if [ "$LMT_CONTROL_HD_POWERMGMT" != 0 ] \
+     && [ -e /var/run/laptop-mode-tools/enabled ]
+  then
+    # Laptop mode controls hdparm -B settings, we don't.
+    DO_HDPARM=n
+  fi
+fi
+
+if [ "$DO_HDPARM" = y ] ; then
+  # Get the power state into STATE
+  getState;
+  
+  for dev in /dev/sd? /dev/hd? ; do
+    if [ -b $dev ] ; then
+      # Check for APM support; discard errors since not all drives
+      # support HDIO_GET_IDENTITY (-i).    
+      if hdparm -i $dev 2> /dev/null | grep -q 'AdvancedPM=yes' ; then
+	if [ "$STATE" = "BATTERY" ] ; then
+	  hdparm -B 128 $dev
+	else
+	  hdparm -B 254 $dev
+	fi
+      fi
+    fi
+  done
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/01-laptop-mode.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/01-laptop-mode.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+# There have been reports of non-working suspend if laptop mode was enabled
+# during suspend. See for example Debian BTS #458437.
+if [ -e /etc/init.d/laptop-mode ] ; then
+	invoke-rc.d laptop-mode stop 
+fi
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/05-acpi-lock.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/05-acpi-lock.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+#prevent acpid from processing any following events
+touch /var/lock/acpisleep
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/10-thinkpad-standby-led.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/10-thinkpad-standby-led.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+. /usr/share/acpi-support/state-funcs
+setLEDThinkpadSuspending 1
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/30-proc-sysfs-save-state.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/30-proc-sysfs-save-state.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Paul Sladen 2007-03-22
+# Save the state of various things that the kernel does not, or cannot
+# maintain over the course of a suspend/resume or suspend/hibernate
+# cycle.  Lines are written into '/var/run/proc-sysfs-save-state' in
+# the format:
+# /sys/foo/bar/moo = XYZ
+
+if [ -d /var/run -a -w /var/run ] ; then
+    ( 
+	for i in /sys/class/net/*/device/rf_kill /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ; do
+	    if [ -r "$i" ] ; then
+		echo -n "$i = " ; cat "$i"
+	    fi
+	done
+
+	i=/proc/acpi/ibm/bluetooth
+	if [ -r $i ] ; then
+	    echo -n "$i = "
+	    grep -q disabled /proc/acpi/ibm/bluetooth && echo disable || echo enable
+	fi
+    ) > /var/run/proc-sysfs-save-state
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/50-irda-stop.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/50-irda-stop.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Stop IRDA if it's running
+if [ -f /var/run/irattach.pid ]; then
+    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+	invoke-rc.d irda-utils stop
+    else
+	/etc/init.d/irda-utils stop
+    fi
+    killall -9 irattach
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/50-tosh-save-brightness.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/50-tosh-save-brightness.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+TOSH_LCD=/proc/acpi/toshiba/lcd
+
+if [ -e $TOSH_LCD ]; then
+  TOSH_BRIGHTNESS=$(( `grep brightness: $TOSH_LCD | cut -d: -f2` + 0 ))
+  TOSH_MAXBRIGHT=$(( `grep brightness_levels: $TOSH_LCD | cut -d: -f2` - 1))
+  # Turn brightness to max to make bios password prompt easier to see
+  echo 'brightness : '$TOSH_MAXBRIGHT > $TOSH_LCD
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/55-down-interfaces.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/55-down-interfaces.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+pccardctl eject
+
+# Get rid of any currently running dhclients
+killall dhclient dhclient3 2>/dev/null
+
+# First do all network interfaces that were brought up by ifupdown. These are
+# the only interfaces that we bring up on resume (the other ones are probably
+# managed by other tools, such as NetworkManager, and will be brought up
+# automatically). Due to logical interfaces, the interfaces that we pass to
+# ifdown are DIFFERENT than those that we pass to ifup, see Debian BTS #475002.
+IFDOWN_INTERFACES="`cat /var/run/network/ifstate | sed 's/=.*//'`"
+IFUP_INTERFACES="`cat /var/run/network/ifstate`"
+
+must_control_interface()
+{
+  # Always skip lo
+  test "$1" = "lo" && return 1
+  for i in $SKIP_INTERFACES; do
+      # Skip if listed in $SKIP_INTERFACES
+      echo "$1" | grep -q "^$i" && return 1
+  done
+  return 0
+}
+
+
+# Shut down the interfaces (except lo, which can and should be kept up)
+for x in $IFDOWN_INTERFACES; do
+    if must_control_interface $x ; then
+ 	if [ -x /sbin/wpa_action ] && wpa_action $x check; then
+	 	# Ugly workaround for the fact that wpasupplicant does not hook
+	 	# into ifdown itself. See Debian BTS #473184, #390884.
+ 		wpa_action $x stop
+ 	else
+ 		ifdown $x
+ 	fi
+    fi
+done
+
+# Tell NetworkManager to shut down networking
+dbus-send --system --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.sleep
+
+# Find the remaining running network interfaces...
+INTERFACES=`/sbin/ifconfig | awk '/^[^ ]+/ {print $1}'`
+
+# And shut them down (except lo, which can and should be kept up)
+for x in $INTERFACES; do
+    if must_control_interface $x ; then
+      ifconfig $x down
+    fi
+done
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/60-generate-modules-list.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/60-generate-modules-list.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+for x in /sys/module/*_ircc /sys/module/*_ircc2; do
+    x=`basename $x`
+    # nsc_ircc is safe over suspend/resume
+    if [ $x != "nsc_ircc" ]; then
+	modprobe -r $x 2>/dev/null;
+	# These don't get added to the reload list, since irda startup will
+ 	# do that
+    fi
+done
+
+if [ -d /sys/module/ndiswrapper ]; then
+        modprobe -r ndiswrapper
+        MODULES="$MODULES ndiswrapper"
+fi
+
+# This is not guaranteed to work - several drivers appear to use names that
+# are not the same as their module name
+for x in /sys/class/net/*; do
+    if [ -e $x/device/driver ]
+        then
+        MODULES="$MODULES $(basename $(readlink $x/device/driver) | tr [:upper:\] [:lower:])"
+    fi
+done
+
+if [ -d /sys/module/netconsole ]; then
+    rmmod netconsole
+    MODULES="$MODULES netconsole"
+fi
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/65-services-stop.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/65-services-stop.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Shut down services known to misbehave
+for x in $STOP_SERVICES; do
+        invoke-rc.d --quiet $x stop
+done
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/70-modules-unload.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/70-modules-unload.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Some modules survive better if they're left loaded
+for x in $MODULES_WHITELIST; do
+        MODULES=`echo $MODULES | sed s/$x//g`;
+done
+
+# Now remove various modules that might misbehave while suspending
+for x in $MODULES; do
+    modprobe -r $x 2>/dev/null;
+done
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/75-console-switch.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/75-console-switch.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# And remember which console we're on
+CONSOLE=`fgconsole`
+
+# Change away from X, otherwise it'll blow up when we POST the video interface
+chvt 12
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/80-video-vesa-state.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/80-video-vesa-state.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if [ x$SAVE_VBE_STATE = "xtrue" ]; then
+  # Check if we're in a VESA mode - if so, we need to do things more
+  # awkwardly. Otherwise, just use the state from boot.
+  VBEMODE=$(vbetool vbemode get || echo FAILED);
+  if ( echo "$VBEMODE" | grep -q FAILED ); then
+ 	echo "vbetool returned an error while requesting the vbe mode."
+  else
+    if [ "$VBEMODE" != "3" ]; then
+      vbetool vbemode set 3;
+      vbetool vbestate save >$VBESTATE;
+    fi
+  fi
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/81-video-pci-state.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/81-video-pci-state.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Save video PCI state?
+if [ x$SAVE_VIDEO_PCI_STATE = xtrue ]; then
+  for x in /sys/bus/pci/devices/*; do
+    if [ `cat $x/class` = "0x030000" ]; then
+        cat $x/config >/var/run/vga-pci-`basename $x`;
+    fi
+  done
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/85-alsa-state.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/85-alsa-state.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Save the ALSA state
+if [ -x /etc/init.d/alsa-utils ]; then
+        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+                invoke-rc.d alsa-utils stop
+        else
+		/etc/init.d/alsa-utils stop
+        fi
+fi
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspend.d/90-framebuffer-stop.sh
+++ acpi-support-0.142/debian/examples/acpi/suspend.d/90-framebuffer-stop.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# Make sure the backlight goes off
+if [ x$USE_DPMS = "xtrue" ]; then
+  vbetool dpms off
+fi
+
+# SHUT UP FRAMEBUFFER
+for x in /sys/class/graphics/*; do
+    if [ -f $x/state ]; then
+        echo -n 1 >$x/state;
+    fi
+done
+
--- acpi-support-0.142.orig/debian/examples/acpi/suspendorhibernate
+++ acpi-support-0.142/debian/examples/acpi/suspendorhibernate
@@ -0,0 +1,212 @@
+#!/bin/sh
+#
+# How we handle suspend/hibernate is a bit complicated:
+#
+# If gnome-power-manager or klaptopdaemon are running, we send a fake key
+# and that's it. The daemons may have policies that turn off suspend in
+# response to suspend keys etc., so we don't want to do anything ourselves.
+#
+# If not, we follow the SUSPEND_METHODS setting.
+#
+#
+# This script takes parameter "suspend" or "hibernate".
+#
+. /etc/default/acpi-support
+. /usr/share/acpi-support/power-funcs
+. /usr/share/acpi-support/device-funcs
+. /usr/share/acpi-support/policy-funcs
+. /usr/share/acpi-support/key-constants
+
+DeviceConfig;
+
+# The difference between suspend and hibernate
+if [ "$1" = "suspend" ] ; then
+	KEY=$KEY_SLEEP
+	HIBERNATE_CMD=/usr/sbin/hibernate-ram
+	PM_UTILS_CMD=/usr/sbin/pm-suspend
+	DBUS_METHOD=Suspend
+	DBUS_PARAMS="int32:0"
+elif [ "$1" = "hibernate" ] ; then
+	KEY=$KEY_SUSPEND
+	HIBERNATE_CMD=/usr/sbin/hibernate-disk
+	PM_UTILS_CMD=/usr/sbin/pm-hibernate
+	DBUS_METHOD=Hibernate
+	DBUS_PARAMS=
+else
+	echo "'Usage: '$0' (suspend|hibernate)'"
+fi
+
+
+#
+# Backward compatibility
+#
+
+# Backward compatibility for setting USE_HIBERNATE_PACKAGE
+if [ "$SUSPEND_METHODS" = "" ] &&
+   [ "$USE_HIBERNATE_PACKAGE" = "true" ] &&
+   [ -x "$HIBERNATE_CMD" ] ; then
+	SUSPEND_METHODS="hibernate"
+fi
+
+# Backward compatibility for setups before SUSPEND_METHODS existed.
+if [ "$SUSPEND_METHODS" = "" ] ; then
+	# Legacy configuration -- use the built-in legacy suspend support. We
+	# can NEVER change this explicitly, because it will break people's
+	# working suspend setups, especially ones that depend on custom scripts
+	# in /etc/acpi/suspend.d and /etc/acpi/resume.d.
+	SUSPEND_METHODS="acpi-support"
+fi
+
+#
+# Just in case ...
+#
+sync
+
+#
+# Try the SUSPEND_METHODS in order.
+#
+
+for METHOD in $SUSPEND_METHODS; do
+	case $METHOD in
+	none)
+		exit
+		;;
+		
+	dbus-pm)
+		if [ -x /usr/bin/dbus-send ] ; then
+			# Call the power management daemon (which, if it is
+			# running, we probably don't know about, since we send
+			# keys if we detect one running that we know of).
+			if /usr/bin/dbus-send --session \
+			  --dest=org.freedesktop.PowerManagement \
+			  --type=method_call \
+			  --print-reply \
+			  --reply-timeout=2000 \
+			  /org/freedesktop/PowerManagement \
+			  org.freedesktop.PowerManagement.$DBUS_METHOD ;
+			  then			  
+			  	# The other side exists, we have access to it,
+			  	# and it received the message. It may have
+			  	# failed (I tested this: if pm-suspend returns
+			  	# exit code 1, then the return code of dbus-send
+			  	# is still 0 and you get no errors), but that
+			  	# doesn't matter: the first method in the list
+			  	# that we can access is the one that has to do
+			  	# it.
+			  	exit
+			fi
+			# We got a DBUS error, which means that the other side
+			# does not exist or we don't have access to it. We
+			# continue by trying the next option.
+		fi
+		;;
+		
+	dbus-hal)
+		if [ -x /usr/bin/dbus-send ] ; then
+			# Call HAL directly.
+			if /usr/bin/dbus-send --system \
+			  --dest=org.freedesktop.Hal \
+			  --type=method_call \
+			  --print-reply \
+			  --reply-timeout=2000 \
+			  /org/freedesktop/Hal/devices/computer \
+			  org.freedesktop.Hal.Device.SystemPowerManagement.$DBUS_METHOD $DBUS_PARAMS ;
+			  then			  
+			  	# The other side exists, we have access to it,
+			  	# and it received the message. It may have
+			  	# failed (I tested this: if pm-suspend returns
+			  	# exit code 1, then the return code of dbus-send
+			  	# is still 0 and you get no errors), but that
+			  	# doesn't matter: the first method in the list
+			  	# that we can access is the one that has to do
+			  	# it.
+			  	exit
+			fi
+			# We got a DBUS error, which means that the other side
+			# does not exist or we don't have access to it. We
+			# continue by trying the next option.
+		fi
+		;;
+		
+	pm-utils)
+		if [ -x $PM_UTILS_CMD ] ; then
+			$PM_UTILS_CMD
+			exit
+		fi
+		;;
+		
+	hibernate)
+		if [ -x $HIBERNATE_CMD ] ; then
+			$HIBERNATE_CMD
+			exit		
+		fi
+		;;
+		
+	acpi-support)
+		if [ "$1" = "hibernate" ] ; then
+			if [ x$ACPI_HIBERNATE != xtrue ]; then
+			  exit;
+			fi
+					
+			# Unset video posting - it's not needed for suspend to disk
+			unset POST_VIDEO
+			unset USE_DPMS
+
+			. /etc/acpi/prepare.sh
+
+			echo -n $HIBERNATE_MODE >/sys/power/disk
+
+			if [ -x /usr/sbin/s2disk ]; then
+			    /usr/sbin/s2disk
+			else
+			    echo -n "disk" >/sys/power/state
+			fi
+
+			. /etc/acpi/resume.sh
+		else	# $1 = suspend			
+			if [ x$ACPI_SLEEP != xtrue ]; then
+			  exit;
+			fi
+
+			if [ x$LOCK_SCREEN = xtrue ]; then
+			    if pidof xscreensaver > /dev/null; then 
+				d=/tmp/.X11-unix
+				for x in $d/*; do
+				    displaynum=${x#$d/X}
+				    getXuser;
+				    if [ x"$XAUTHORITY" != x"" ]; then	    
+					export DISPLAY=":$displaynum"
+					. /usr/share/acpi-support/screenblank
+				    fi
+				done
+			    fi
+			fi
+
+			# Generic preparation code
+			. /etc/acpi/prepare.sh
+
+			if [ x$DISABLE_DMA = xtrue ] && [ -b /dev/hda ]; then
+			  hdparm -d 0 /dev/hda
+			fi
+
+			echo -n $ACPI_SLEEP_MODE >/sys/power/state
+
+			if [ x$RESET_DRIVE = xtrue ] && [ -b /dev/hda ]; then
+			    hdparm -w /dev/hda
+			    hdparm -C /dev/hda
+			    hdparm -C /dev/hda
+			    hdparm -C /dev/hda
+			    hdparm -d 1 /dev/hda
+			fi
+
+			if [ x$DISABLE_DMA = xtrue ] && [ -b /dev/hda ]; then
+			  hdparm -d 1 /dev/hda
+			fi
+
+			# Generic wakeup code
+			. /etc/acpi/resume.sh	
+		fi	
+		exit
+		;;
+	esac
+done
--- acpi-support-0.142.orig/debian/examples/config/56548.config
+++ acpi-support-0.142/debian/examples/config/56548.config
@@ -0,0 +1,6 @@
+case "$model" in
+# The 'Uknown' below is *NOT* a typo
+	"Uknown"*)
+		ACPI_SLEEP=true
+	;;
+esac
--- acpi-support-0.142.orig/debian/examples/config/ASUSTeK Computer Inc..config	
+++ acpi-support-0.142/debian/examples/config/ASUSTeK Computer Inc..config	
@@ -0,0 +1,20 @@
+case "$model" in
+	"A5E"*)
+		ACPI_SLEEP=true
+	;;
+	"A6U"*)
+		ACPI_SLEEP=true
+	;;
+	"L7000G series Notebook PC"*) 
+		ACPI_SLEEP=true
+	;;
+	"L5Gx"*)
+		ACPI_SLEEP=true
+	;;
+	"M6Ne"*) 
+		ACPI_SLEEP=true
+	;;
+	"W5A"*) 
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/Acer, inc..config	
+++ acpi-support-0.142/debian/examples/config/Acer, inc..config	
@@ -0,0 +1,14 @@
+case "$model" in
+	"Aspire 3000"*)
+		ACPI_SLEEP=true
+	;;
+	"Ferrari 4000"*)
+		ACPI_SLEEP=true
+	;;
+	"TravelMate 3260"*)
+		SAVE_VIDEO_PCI_STATE=true
+	;;
+	"TravelMate 8100"*)
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/Acer.config
+++ acpi-support-0.142/debian/examples/config/Acer.config
@@ -0,0 +1,11 @@
+case "$model" in
+	"Aspire 2000"*)
+		ACPI_SLEEP=true
+	;;
+	"TravelMate 290"*)
+		ACPI_SLEEP=true
+	;;
+	"TravelMate 660"*)
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/Compaq.config
+++ acpi-support-0.142/debian/examples/config/Compaq.config
@@ -0,0 +1,8 @@
+case "$model" in
+	"Armada    E500"*)
+		ACPI_SLEEP=true
+	;;
+        "Evo N600c"*)
+                ACPI_SLEEP=true
+        ;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/Dell Computer Corporation.config	
+++ acpi-support-0.142/debian/examples/config/Dell Computer Corporation.config	
@@ -0,0 +1,2 @@
+. "/usr/share/acpi-support/Dell Inc..config"
+
--- acpi-support-0.142.orig/debian/examples/config/Dell Inc..config	
+++ acpi-support-0.142/debian/examples/config/Dell Inc..config	
@@ -0,0 +1,60 @@
+case "$model" in
+	"Inspiron 700m"*)
+		ACPI_SLEEP=true;
+	;;
+	"Inspiron 1200"*)
+		ACPI_SLEEP=true;
+	;;
+	"Inspiron 6000"*)
+		ACPI_SLEEP=true;
+	;;
+        "Inspiron 8100"*)
+                ACPI_SLEEP=true;
+        ;;
+        "Inspiron 8200"*)
+                ACPI_SLEEP=true;
+        ;;
+        "Inspiron 8600"*)
+                ACPI_SLEEP=true;
+		POST_VIDEO=false;
+        ;;
+	"Inspiron 9300"*)
+		ACPI_SLEEP=true;
+	;;
+	"Inspiron XPS Gen2"*)
+		ACPI_SLEEP=true;
+	;;
+	"Latitude 110L"*)
+		ACPI_SLEEP=true;
+	;;
+	"Latitude D410"*)
+		ACPI_SLEEP=true;
+	;;
+	"Latitude D505"*)
+		ACPI_SLEEP=true;
+	;;
+	"Latitude D510"*)
+		ACPI_SLEEP=true;
+	;;
+	"Latitude D600"*)
+		ACPI_SLEEP=true;
+	;;
+	"Latitude D610"*)
+		ACPI_SLEEP=true;
+	;;
+	"Latitude D800"*)
+		ACPI_SLEEP=true;
+	;;
+	"Latitude D810"*)
+		ACPI_SLEEP=true;
+	;;
+	"Latitude X1"*)
+		ACPI_SLEEP=true;
+	;;
+	"Latitude X300"*)
+		ACPI_SLEEP=true;
+	;;
+	"Precision M20"*)
+		ACPI_SLEEP=true;
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/ECS.config
+++ acpi-support-0.142/debian/examples/config/ECS.config
@@ -0,0 +1,5 @@
+case "$model" in
+	"G556 Centrino"*)
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/FUJITSU SIEMENS.config	
+++ acpi-support-0.142/debian/examples/config/FUJITSU SIEMENS.config	
@@ -0,0 +1,32 @@
+case "$model" in
+	"Amilo A7640"*)
+		ACPI_SLEEP=true
+	;;
+	"AMILO M"*)
+		ACPI_SLEEP=true
+	;;
+	"LIFEBOOK E4010"*)
+                ACPI_SLEEP=true
+		POST_VIDEO=false
+	;;		
+	"LifeBook S Series"*)
+		ACPI_SLEEP=true
+	;;
+	"LIFEBOOK S7020"*)
+ 		SAVE_VIDEO_PCI_STATE=true
+ 		ACPI_SLEEP=true
+ 	;;
+	"LIFEBOOK S7110"*|"LifeBook S7110"*)
+ 		SAVE_VIDEO_PCI_STATE=true
+ 		ACPI_SLEEP=true
+ 	;;
+	"LIFEBOOK S6120"*)
+		ACPI_SLEEP=true
+	;;
+	"LIFEBOOK C1110"*)
+		ACPI_SLEEP=true
+	;;
+	"LIFEBOOK P7010"*)
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/FUJITSU.config
+++ acpi-support-0.142/debian/examples/config/FUJITSU.config
@@ -0,0 +1,2 @@
+. "/usr/share/acpi-support/FUJITSU SIEMENS.config"
+
--- acpi-support-0.142.orig/debian/examples/config/Hewlett-Packard.config
+++ acpi-support-0.142/debian/examples/config/Hewlett-Packard.config
@@ -0,0 +1,57 @@
+case "$model" in
+	"HP Compaq nc4200"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Compaq nc6000"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Compaq nx6110"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Compaq nc6120"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Compaq nx6125"*)
+		ACPI_SLEEP=true
+		POST_VIDEO=false
+	;;
+	"HP Compaq nc6220"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Compaq nc6230"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Compaq nx8220"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Compaq nc8230"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Compaq nx9040"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Pavilion dv1000"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Pavilion zt3000"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Tablet PC Tx1100"*)
+		ACPI_SLEEP=true
+	;;
+	"HP Tablet PC TR1105"*)
+		ACPI_SLEEP=true
+	;;
+	"Pavilion dv4000"*)
+		ACPI_SLEEP=true
+	;;
+	"Pavilion zd7000"*)
+		ACPI_SLEEP=true
+	;;
+        "Pavilion zv6000"*)
+		ACPI_SLEEP=true
+	;;
+	"Presario 2200"*)
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/IBM.config
+++ acpi-support-0.142/debian/examples/config/IBM.config
@@ -0,0 +1,93 @@
+case "$model" in
+	# R40 
+	2681*|2682*|2683*|2892*|2893*|2896*|2898*|2899*)
+		ACPI_SLEEP=true;
+	;;
+	# More R40
+	2722*|2723*|2724*|2897*)
+		ACPI_SLEEP=true;
+	;;
+	# R50/p 
+	1829*|1830*|1831*|1832*|1833*|1836*|1840*|1841*)
+		ACPI_SLEEP=true;
+	;;
+	# R50e 1834 - see LP: #40621, #211285
+	1834*)
+		ACPI_SLEEP=true;
+		SAVE_VIDEO_PCI_STATE=true;
+		SAVE_VBE_STATE=true;
+		POST_VIDEO=true;
+        ;;
+	1842*|2670*)
+		ACPI_SLEEP=true;
+		SAVE_VIDEO_PCI_STATE=true;
+		SAVE_VBE_STATE=false;
+		POST_VIDEO=false;
+        ;;
+	# R52 
+	1846*|1847*|1848*|1849*|1850*|1858*|1870*)
+		ACPI_SLEEP=true;
+	;;
+	# T21
+	2647*|2648*)
+		ACPI_SLEEP=true;
+	;;
+	# T23 - seems to have a different format
+	475S*)
+		ACPI_SLEEP=true;
+	;;
+	# T40/T41/T42/p
+	2373*|2374*|2375*|2376*|2378*|2379*)
+		ACPI_SLEEP=true;
+	;;
+	# T43 
+	1871*|1872*|1873*|1874*|1875*|1876*)	
+		ACPI_SLEEP=true;
+	;;
+	#T43/p
+	2668*|2669*|2678*|2679*|2686*|2687*)
+		ACPI_SLEEP=true;
+	;;
+	# X30
+	2672*)
+		ACPI_SLEEP=true;
+		SAVE_VBE_STATE=false;
+		# Don't switch backlights off without extra help
+		RADEON_LIGHT=true;
+	;;
+	# more X30
+	2673*|2884*|2885*|2890*|2891*)
+		ACPI_SLEEP=true;
+		# Don't switch backlights off without extra help
+		RADEON_LIGHT=true;
+	;;
+	# X40
+	2369*|2370*|2371*|2372*|2382*|2386*)
+		ACPI_SLEEP=true;
+	;;
+	# X41
+	1864*|1865*|2525*|2526*|2527*|2528*)
+		ACPI_SLEEP=true;
+	;;
+	# X41 Tablet 
+	1866*|1867*|1869*)
+		ACPI_SLEEP=true;
+	;;
+	# X60s
+	1702*|1704*)
+		SAVE_VBE_STATE=false;
+	;;
+	# Z60m (Intel graphics) 'ThinkPad Z60m'
+	2529*)	
+		ACPI_SLEEP=true;
+	;;
+	# ThinkPad R40 with a product name of "_______" (yes, 7 blank spaces)
+	"")
+	case "$bios_version" in
+		# BIOS version for "ThinkPad R40 model 2722, 2723, 2724, 2897"
+		1PET53WW*)
+			ACPI_SLEEP=true
+		;;
+	esac
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/NEC Computers International.config	
+++ acpi-support-0.142/debian/examples/config/NEC Computers International.config	
@@ -0,0 +1,5 @@
+case "$version" in
+	"PB10M00402"*)
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/SHARP Corporation.config	
+++ acpi-support-0.142/debian/examples/config/SHARP Corporation.config	
@@ -0,0 +1,5 @@
+case "$model" in
+	"PC-MM20 Series"*)
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/Samsung Electronics.config	
+++ acpi-support-0.142/debian/examples/config/Samsung Electronics.config	
@@ -0,0 +1,5 @@
+case "$model" in
+		"NX05S"*)	
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/Sony Corporation.config	
+++ acpi-support-0.142/debian/examples/config/Sony Corporation.config	
@@ -0,0 +1,11 @@
+case "$model" in
+	"PCG-U101"*)
+		ACPI_SLEEP=true
+	;;
+        "VGN-FJ1S_W"*)
+                ACPI_SLEEP=true
+        ;;
+	"VGN-S260"*)
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/config/TOSHIBA.config
+++ acpi-support-0.142/debian/examples/config/TOSHIBA.config
@@ -0,0 +1,35 @@
+case "$model" in
+	"libretto U100"*)
+		ACPI_SLEEP=true
+	;;
+	"P4000"*)
+		ACPI_SLEEP=true
+	;;
+	"PORTEGE A100"*)
+		ACPI_SLEEP=true
+	;;
+	"PORTEGE A200"*)
+		ACPI_SLEEP=true
+	;;
+	"PORTEGE M200"*)
+		ACPI_SLEEP=true
+	;;
+	"PORTEGE R200"*)
+		ACPI_SLEEP=true
+	;;
+	"Satellite 1900"*)
+		ACPI_SLEEP=true
+	;;
+	"Satellite M70"*)
+		ACPI_SLEEP=true
+	;;
+	"TECRA A2"*)
+		ACPI_SLEEP=true
+	;;
+	"TECRA A5"*)
+		ACPI_SLEEP=true
+	;;
+	"TECRA M2"*)
+		ACPI_SLEEP=true
+	;;
+esac 
--- acpi-support-0.142.orig/debian/examples/default/acpi-support
+++ acpi-support-0.142/debian/examples/default/acpi-support
@@ -0,0 +1,154 @@
+#
+# Configuration file for the acpi-support package
+#
+#
+# The acpi-support package is intended as "glue" to make special functions of
+# laptops work. Specifically, it translates special function keys for some
+# laptop models into actions or generic function key presses.
+#
+
+
+#
+# Suspend/hibernate method
+# ------------------------
+#
+# When gnome-power-manager or klaptopdaemon are running, acpi-support will
+# translate the suspend and hibernate keys of laptops into special "suspend"
+# and "hibernate" keys that these daemons handle.
+#
+# Only in situations where there is no gnome-power-manager or klaptopdaemon
+# running, acpi-support needs to perform suspend/hibernate in some other way.
+# There are several options for this. The options are:
+#
+# dbus-pm:
+#    Perform suspend and hibernate actions via a DBUS request to the power
+#    management daemon. This works for power management daemons that we don't
+#    know of. (For gnome-power-manager and klaptopdaemon this will do nothing,
+#    since those will be detected when they are running, and triggered using
+#    a virtual keypress.)
+#
+# dbus-hal:
+#    Perform suspend and hibernate actions via a DBUS request directly to HAL,
+#    bypassing any running power management daemons.
+#
+# pm-utils:
+#    Use pm-suspend and pm-hibernate to suspend and hibernate. (The dbus method
+#    normally results in this as well, but calls through dbus. Use this option
+#    only if you don't have dbus installed.) This runs actions in the directory
+#    /usr/lib/pm-utils/sleep.d/.
+#
+# hibernate:
+#    Use the hibernate package to suspend and hibernate.
+#
+# acpi-support:
+#    Use the legacy built-in suspend/hibernate support. (DEPRECATED)
+#    This runs actions in the directory '/etc/acpi/suspend.d/' and
+#    '/etc/acpi/resume.d/'.
+# 
+# none:
+#    Do not attempt to suspend/hibernate. Set SUSPEND_METHODS="none" to
+#    disable suspend/hibernate handling in acpi-support.
+#
+# If you specify dbus or pm-utils, the result will normally be the same as when
+# you suspend from your desktop environment. If you specify "hibernate" or
+# "acpi-support", be aware that this probably does not match what your desktop
+# environment would do (unless you have managed to configure something so that
+# the DBUS power management interfaces call the hibernate package).
+# 
+# NOTE: none of the suspend/hibernate actions are invoked when a
+# laptop is put to sleep with 'acpitool -s'. If you do not use Gnome
+# or KDE and want the following suspend methods to be used, you
+# should run '/etc/acpi/sleep.sh' instead of using 'acpitool'.
+#
+# Please specify a space separated list of options. The recommended value is
+# "dbus pm-utils"
+#
+SUSPEND_METHODS="dbus-pm dbus-hal pm-utils"
+
+
+
+#
+# LEGACY BUILT IN SUSPEND SUPPORT (DEPRECATED)
+# --------------------------------------------
+#
+# These options only work for the "acpi-support" suspend method. This is NOT
+# recommended, but is retained for backward compatibility reasons.
+#
+
+# Comment the next line to disable ACPI suspend to RAM
+ACPI_SLEEP=true
+
+# Comment the next line to disable suspend to disk
+ACPI_HIBERNATE=true
+
+# Change the following to "standby" to use ACPI S1 sleep, rather than S3.
+# This will save less power, but may work on more machines
+ACPI_SLEEP_MODE=mem
+
+# Add modules to this list to have them removed before suspend and reloaded
+# on resume. An example would be MODULES="em8300 yenta_socket"
+#
+# Note that network cards and USB controllers will automatically be unloaded 
+# unless they're listed in MODULES_WHITELIST
+MODULES=""
+
+# Add modules to this list to leave them in the kernel over suspend/resume
+MODULES_WHITELIST=""
+
+# Should we save and restore state using the VESA BIOS Extensions?
+SAVE_VBE_STATE=true
+
+# The file that we use to save the vbestate
+VBESTATE=/var/lib/acpi-support/vbestate
+
+# Should we attempt to warm-boot the video hardware on resume?
+POST_VIDEO=true
+
+# Save and restore video state?
+# SAVE_VIDEO_PCI_STATE=true
+
+# Should we switch the screen off with DPMS on suspend?
+USE_DPMS=true
+
+# Use Radeontool to switch the screen off? Seems to be needed on some machines
+# RADEON_LIGHT=true
+
+# Uncomment the next line to switch away from X and back again after resume.
+# This is needed for some hardware, but should be unnecessary on most.
+# DOUBLE_CONSOLE_SWITCH=true
+
+# Set the following to "platform" if you want to use ACPI to shut down
+# your machine on hibernation
+HIBERNATE_MODE=shutdown
+
+# Comment this out to disable screen locking on resume
+LOCK_SCREEN=true
+
+# Uncomment this line to have DMA disabled before suspend and reenabled
+# afterwards
+# DISABLE_DMA=true
+
+# Uncomment this line to attempt to reset the drive on resume. This seems
+# to be needed for some Sonys
+# RESET_DRIVE=true
+
+# Add services to this list to stop them before suspend and restart them in 
+# the resume process.
+STOP_SERVICES=""
+
+# Restart Infra Red services on resume - off by default as it crashes some
+# machines
+RESTART_IRDA=false
+
+# Add to this list network interfaces that you don't want to be stopped
+# during suspend (in fact any network interface whose name starts with
+# a prefix given in this list is skipped)
+SKIP_INTERFACES="dummy qemu"
+
+# Note: to enable "laptop mode" (to spin down your hard drive for longer
+# periods of time), install the laptop-mode-tools package and configure
+# it in /etc/laptop-mode/laptop-mode.conf. 
+#
+# (Note to upgraders: earlier versions of the acpi-support package contained 
+# an option to enable/disable laptop mode. This option has never actually
+# worked, and for that reason it has been removed.)
--- acpi-support-0.142.orig/debian/examples/init.d/vbesave
+++ acpi-support-0.142/debian/examples/init.d/vbesave
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides:          vbesave
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:     $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      
+# Short-Description: Save VESA state at boot time
+# Description:       VESA state is saved at boot time so that it can be
+#                    restored later to a sane state for example after a suspend.
+### END INIT INFO
+
+test -f /usr/share/acpi-support/power-funcs || exit 0
+
+test -x /usr/sbin/vbetool || exit 0
+set -e
+
+. /lib/lsb/init-functions
+
+test -f /etc/default/rcS && . /etc/default/rcS
+test -f /etc/default/acpi-support && . /etc/default/acpi-support
+test -f /usr/share/acpi-support/device-funcs && . /usr/share/acpi-support/device-funcs
+
+case "$1" in
+ start)
+	if laptop-detect > /dev/null; then
+		LAPTOP=true;
+	fi
+
+	if [ x$LAPTOP != xtrue ]; then
+		exit 0;
+	fi
+
+        DeviceConfig
+	log_begin_msg "Saving VESA state..."
+	if [ "$SAVE_VBE_STATE" = "true" ]; then
+	    if [ "$VERBOSE" = no ]; then 
+		if ! vbetool vbestate save > $VBESTATE 2>/dev/null; then
+		    log_end_msg $?
+		    exit 1
+		fi
+	    else
+		if ! vbetool vbestate save > $VBESTATE ; then
+		    log_end_msg $?
+		    exit 1
+		fi
+	    fi
+	    log_end_msg 0
+        fi
+        ;;
+ stop|restart|force-reload)
+	# Doesn't make sense (and shut up lintian)
+	;;
+ *)
+        exit 0
+        ;;
+esac
--- acpi-support-0.142.orig/debian/lintian/acpi-support
+++ acpi-support-0.142/debian/lintian/acpi-support
@@ -0,0 +1,2 @@
+acpi-support: init.d-script-possible-missing-stop etc/init.d/acpi-support 0 6
+
--- acpi-support-0.142.orig/debian/patches/asus-wireless.sh.diff
+++ acpi-support-0.142/debian/patches/asus-wireless.sh.diff
@@ -0,0 +1,28 @@
+--- acpi-support-0.138/asus-wireless.sh
++++ acpi-support-0.138/asus-wireless.sh
+@@ -5,4 +5,24 @@
+ 
+ . /usr/share/acpi-support/state-funcs
+ 
+-toggleAllWirelessStates
++read vendor </sys/class/dmi/id/sys_vendor 2>/dev/null || exit 0
++case $vendor in
++	[Aa][Ss][Uu][Ss]*)
++		;;
++	*)
++		exit 0
++		;;
++esac
++
++if [ "$1" = "" ] ; then
++	toggleAllWirelessStates;
++elif isAnyWirelessPoweredOn; then
++	if [ "$1" = "off" ] ; then
++		toggleAllWirelessStates;
++	fi
++else
++	if [ "$1" = "on" ] ; then
++		toggleAllWirelessStates;
++	fi
++fi
++
--- acpi-support-0.142.orig/debian/patches/ibm.diff
+++ acpi-support-0.142/debian/patches/ibm.diff
@@ -0,0 +1,47 @@
+--- acpi-support/ibm-wireless.sh.orig	2009-12-28 19:00:36.000000000 +0100
++++ acpi-support/ibm-wireless.sh	2009-12-28 19:35:02.000000000 +0100
+@@ -1,10 +1,29 @@
+ #!/bin/sh
+ 
+ test -f /usr/share/acpi-support/state-funcs || exit 0
++
++read vendor </sys/class/dmi/id/sys_vendor 2>/dev/null || exit 0
++case $vendor in
++	[iI][bB][mM]*)
++		;;
++	[lL][eE][nN][oO][vV][oO]*)
++		;;
++	*)
++		exit 0
++		;;
++esac
++
++if ! test -x /usr/sbin/rfkill
++then
++logger -t${0##*/} -perr -- "Error: Please install package rfkill to enable toggling of wireless devices."
++exit 0
++fi
++
+ 
+ # Find and toggle wireless of bluetooth devices on ThinkPads
+ 
+ . /usr/share/acpi-support/state-funcs
++. /etc/default/acpi-support
+ 
+ rfkill list | sed -n -e'/tpacpi_bluetooth_sw/,/^[0-9]/p' | grep -q 'Soft blocked: yes'
+ bluetooth_state=$?
+@@ -16,8 +23,14 @@
+ if ! isAnyWirelessPoweredOn; then
+     # Wireless was turned off
+     if [ "$bluetooth_state" = 0 ]; then
++      if [ x$WIRELESS_BLUETOOTH_SYNC != xtrue ]; then
+         rfkill unblock bluetooth
++      fi
+     else
+         rfkill block bluetooth
+     fi
++else
++    if [ x$WIRELESS_BLUETOOTH_SYNC = xtrue -a "$bluetooth_state" = 0 ]; then
++	rfkill unblock bluetooth
++    fi
+ fi
--- acpi-support-0.142.orig/debian/patches/key-constants.diff
+++ acpi-support-0.142/debian/patches/key-constants.diff
@@ -0,0 +1,83 @@
+--- acpi-support-0.142/key-constants	2013-05-01 02:59:34.000000000 +0200
++++ acpi-support-0.142/key-constants	2014-07-07 14:06:00.629447607 +0200
+@@ -1,5 +1,10 @@
+-# Generated from /usr/include/linux/input.h dated Sat Feb  4 14:58:52 GMT 2006
++# Generated from /usr/include/linux/input.h dated Di 1. Jul 00:06:57 CEST 2014
++KEY_CNT=0
++KEY_HANGUEL=0
++KEY_MIN_INTERESTING=0
+ KEY_RESERVED=0
++KEY_SCREENLOCK=0
++KEY_WIMAX=0
+ KEY_ESC=1
+ KEY_1=2
+ KEY_2=3
+@@ -83,7 +88,6 @@
+ KEY_KP3=81
+ KEY_KP0=82
+ KEY_KPDOT=83
+-KEY_103RD=84
+ KEY_ZENKAKUHANKAKU=85
+ KEY_102ND=86
+ KEY_F11=87
+@@ -119,8 +123,9 @@
+ KEY_KPEQUAL=117
+ KEY_KPPLUSMINUS=118
+ KEY_PAUSE=119
++KEY_SCALE=120
+ KEY_KPCOMMA=121
+-KEY_HANGUEL=122
++KEY_HANGEUL=122
+ KEY_HANJA=123
+ KEY_YEN=124
+ KEY_LEFTMETA=125
+@@ -179,6 +184,8 @@
+ KEY_SCROLLDOWN=178
+ KEY_KPLEFTPAREN=179
+ KEY_KPRIGHTPAREN=180
++KEY_NEW=181
++KEY_REDO=182
+ KEY_F13=183
+ KEY_F14=184
+ KEY_F15=185
+@@ -195,6 +202,7 @@
+ KEY_PAUSECD=201
+ KEY_PROG3=202
+ KEY_PROG4=203
++KEY_DASHBOARD=204
+ KEY_SUSPEND=205
+ KEY_CLOSE=206
+ KEY_PLAY=207
+@@ -217,10 +225,31 @@
+ KEY_BRIGHTNESSDOWN=224
+ KEY_BRIGHTNESSUP=225
+ KEY_MEDIA=226
+-KEY_VIDEOOUT=227
++KEY_SWITCHVIDEOMODE=227
++KEY_KBDILLUMTOGGLE=228
++KEY_KBDILLUMDOWN=229
++KEY_KBDILLUMUP=230
++KEY_SEND=231
++KEY_REPLY=232
++KEY_FORWARDMAIL=233
++KEY_SAVE=234
++KEY_DOCUMENTS=235
++KEY_BATTERY=236
++KEY_BLUETOOTH=237
++KEY_WLAN=238
++KEY_UWB=239
+ KEY_UNKNOWN=240
++KEY_VIDEO_NEXT=241
++KEY_VIDEO_PREV=242
++KEY_BRIGHTNESS_CYCLE=243
++KEY_BRIGHTNESS_ZERO=244
++KEY_DISPLAY_OFF=245
++KEY_WWAN=246
++KEY_RFKILL=247
++KEY_MICMUTE=248
+ KEY_LOCK=$KEY_COFFEE
+ KEY_LIGHT=$KEY_F19
++KEY_VIDEOOUT=$KEY_F20
+ KEY_ROTATESCREEN=$KEY_F21
+ KEY_VIDEOMODECYCLE=$KEY_F22
+ KEY_PRESENTATION=$KEY_F23
--- acpi-support-0.142.orig/debian/patches/series
+++ acpi-support-0.142/debian/patches/series
@@ -0,0 +1,5 @@
+asus-wireless.sh.diff
+ibm.diff
+key-constants.diff
+state-funcs.diff
+undock.sh.diff
--- acpi-support-0.142.orig/debian/patches/state-funcs.diff
+++ acpi-support-0.142/debian/patches/state-funcs.diff
@@ -0,0 +1,186 @@
+--- acpi-support/lib/state-funcs
++++ acpi-support/lib/state-funcs
+@@ -1,96 +1,103 @@
+-#!/bin/sh
+ # Paul Sladen, 2006-03-28, 2007-03-26
++# Luca Niccoli <lultimouomo@gmail.com>, 2010-06-23
++# Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>, 2010-12-14
+ # Library functions to check/change status of wireless
+ 
+-# Return 0 if there is, allowing you to write   if isAnyWirelessPoweredOn; then ...
+-isAnyWirelessPoweredOn()
+-{
+-    for DEVICE in /sys/class/net/* ; do
+-	if [ -d $DEVICE/wireless ]; then
+-	    for RFKILL in $DEVICE/phy80211/rfkill*/state $DEVICE/device/rfkill/rfkill*/state
+-	    do
+-		if [ -r "$RFKILL" ] && [ "$(cat "$RFKILL")" -eq 1 ]
+-		then
+-		    return 0
+-		fi
+-	    done
+-	    # if any of the wireless devices are turned on then return success
+-	    if [ -r $DEVICE/device/power/state ] && [ "`cat $DEVICE/device/power/state`" -eq 0 ]
+-	    then
+-		return 0
+-	    fi
+-	    if [ -r $DEVICE/device/rf_kill ] && [ "`cat $DEVICE/device/rf_kill`" -eq 0 ]
+-	    then
+-		return 0
+-	    fi
+-	fi
+-    done
++# Setup WLAN_RFKILLS list
++WLAN_RFKILLS=
++for r in /sys/class/rfkill/rfkill*; do
++	! read t <$r/type || [ "$t" != wlan ] ||
++		WLAN_RFKILLS=${WLAN_RFKILLS:+$WLAN_RFKILLS }$r/state
++done
+ 
+-    # otherwise return failure
+-    return 1
++haveDevRfkill() {
++	[ -c /dev/rfkill ] && [ -x /usr/sbin/rfkill ]
++}
++
++isAnyWirelessPoweredOn() {
++	local RFKILL s
++
++	if haveDevRfkill; then
++		rfkill list wlan |
++			egrep -q "Soft[[:blank:]]+blocked:[[:blank:]]+no"
++		return $?
++	else
++		for RFKILL in $WLAN_RFKILLS ; do
++			[ ! -r "$RFKILL" ] || ! read s <$RFKILL ||
++				[ "$s" -ne 1 ] || return 0
++		done
++	fi
++	# otherwise return failure
++	return 1
+ }
+ 
+ # Takes no parameters, toggles all wireless devices.
+-# TODO: Should possible toggle all wireless devices to the state of the first one.
+-# Attempts to use 'rf_kill' first, and then tries 'power/state', though that
+-# will fail on >=2.6.18 kernels since upstream removed the functionality...
+-toggleAllWirelessStates()
+-{
+-    for DEVICE in /sys/class/net/* ; do
+-	if [ -d $DEVICE/wireless ] ; then
+-	    # $DEVICE is a wireless device.
+-
+-	    FOUND=
+-	    # Yes, that's right... the new interface reverses the truth values.
+-	    ON=1
+-	    OFF=0
+-	    for CONTROL in $DEVICE/device/rfkill/rfkill*/state; do
+-		if [ -w "$CONTROL" ]; then
+-		    FOUND=1
+-
+-		    if [ "$(cat "$CONTROL")" = "$ON" ] ; then
+-			# It's powered on. Switch it off.
+-			echo -n "$OFF" > "$CONTROL"
+-		    else
+-			# It's powered off. Switch it on.
+-			echo -n "$ON" > "$CONTROL"
+-		    fi
+-		fi
+-	    done
+-	    # it might be safe to assume that a device only supports one
+-	    # interface at a time; but just in case, we short-circuit
+-	    # here to avoid toggling the power twice
+-	    if [ -n "$FOUND" ]; then
+-		continue
+-	    fi
+-
+-	    ON=0
+-	    OFF=1  # 1 for rf_kill, 2 for power/state
+-	    for CONTROL in $DEVICE/device/rf_kill $DEVICE/device/power/state ; do
+-		if [ -w $CONTROL ] ; then
+-		    # We have a way of controlling the device, lets try
+-		    if [ "`cat $CONTROL`" = 0 ] ; then
+-			# It's powered on. Switch it off.
+-			if echo -n $OFF > $CONTROL ; then 
+-			    break
++toggleAllWirelessStates() {
++	local WIFACE RFKILL get_wifaces zzz=0 max_zzz=7
++	local wicd_connect=/usr/share/wicd/daemon/autoconnect.py
++
++	if [ -x /usr/sbin/iw ]; then
++		get_wifaces='iw dev | sed -rne "s|^[[:blank:]]+Interface[[:blank:]]+([[:alnum:]]+).*$|\1|p"'
++	elif [ -x /sbin/iwconfig ]; then
++		get_wifaces='iwconfig 2>/dev/null | grep -o "^[[:alnum:]]*"'
++	else
++		logger -t${0##*/} -perr -- \
++			toggleAllWirelessStates: no way to pick up interfaces
++		exit 1
++	fi
++
++	if [ -x /sbin/ip ]; then
++		if_cmd="ip link set dev"
++	elif [ -x /sbin/ifconfig ]; then
++		if_cmd=ifconfig
++	else
++		logger -t${0##*/} -perr -- \
++			toggleAllWirelessStates: no way to up/down interfaces
++		exit 1
++	fi
++
++	# If rfkill is handled by the kernel, don't touch it
++	if ! grep -q '^H.*\brfkill\b' /proc/bus/input/devices; then
++		if isAnyWirelessPoweredOn; then
++			# 'down'ing wireless interfaces, helps with some
++			# buggy drivers
++			for WIFACE in $(eval $get_wifaces); do
++				$if_cmd $WIFACE down 2>/dev/null || :
++			done
++			if haveDevRfkill; then
++				rfkill block wlan
+ 			else
+-			    OFF=2 # for power/state, second time around
++				for RFKILL in $WLAN_RFKILLS; do
++					[ ! -w $RFKILL ] || echo 0 >$RFKILL
++				done
+ 			fi
+-		    else
+-			# It's powered off. Switch it on.
+-			if echo -n $ON > $CONTROL ; then
+-			    break
++		else
++			if haveDevRfkill; then
++				rfkill unblock wlan
++			else
++				for RFKILL in $WLAN_RFKILLS; do
++					[ ! -w $RFKILL ] || echo 1 >$RFKILL
++				done
+ 			fi
+-		    fi
+ 		fi
+-	    done
+ 	fi
+-    done
++	# Is wireless on now? Set the interfaces up and poke wicd
++	while ! isAnyWirelessPoweredOn && [ $zzz -lt $max_zzz ]; do
++		sleep 1
++		zzz=$(($zzz + 1))
++	done
++	if [ $zzz -lt $max_zzz ]; then
++		for WIFACE in $(eval $get_wifaces); do
++			$if_cmd $WIFACE up 2>/dev/null || :
++		done
++		[ ! -x $wicd_connect ] || $wicd_connect
++	fi
+ }
+ 
+ # Pass '1' to blink suspending LED and '0' to stop LED
+-setLEDThinkpadSuspending()
+-{
+-    action=`test "$1" -ne 0 && echo blink || echo off`
+-    test -w /proc/acpi/ibm/led && echo -n 7 "$action" > /proc/acpi/ibm/led
++setLEDThinkpadSuspending() {
++	local ibm_led=/proc/acpi/ibm/led
++
++	action=$([ "$1" -ne 0 ] && echo blink || echo off)
++	[ ! -w $ibm_led ] || printf '7 %s' $action >$ibm_led
+ }
--- acpi-support-0.142.orig/debian/patches/undock.sh.diff
+++ acpi-support-0.142/debian/patches/undock.sh.diff
@@ -0,0 +1,11 @@
+--- acpi-support/undock.sh.orig	2009-12-10 12:23:03.000000000 +0100
++++ acpi-support/undock.sh	2010-12-26 11:30:46.000000000 +0100
+@@ -4,6 +4,7 @@
+ 
+ for device in /sys/devices/platform/dock.*; do
+ 	[ -e "$device/type" ] || continue
+-	[ x$(cat "$device/type") = xdock_station ] || continue
++	read dt <$dt
++	[ "$dt" = dock_station ] || continue
+ 	echo 1 > "$device/undock"
+ done
--- acpi-support-0.142.orig/debian/rules
+++ acpi-support-0.142/debian/rules
@@ -0,0 +1,41 @@
+#!/usr/bin/make -f
+
+include /usr/share/quilt/quilt.make
+
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+ifeq ($(DEB_HOST_ARCH),i386)
+arch-depends := -V'arch:Suggests=toshset'
+endif
+
+%:
+	dh ${@} --with quilt,systemd
+
+override_dh_auto_build:
+	make -C debian/addons/fakekey all
+
+override_dh_auto_clean:
+	dh_auto_clean
+
+	make -C debian/addons/fakekey clean
+
+override_dh_install:
+	dh_install
+
+	[ ! -d debian/acpi-support ] || find debian/acpi-support/etc/acpi -name "*.sh" -exec chmod a+x {} \;
+	[ ! -d debian/acpi-support ] || chmod a-x debian/acpi-support/usr/share/acpi-support/state-funcs
+	[ ! -d debian/acpi-support-base ] || find debian/acpi-support-base/etc/acpi -name "*.sh" -exec chmod a+x {} \;
+
+override_dh_installinit:
+	dh_installinit -pacpi-support --no-start
+	dh_installinit -pacpi-fakekey
+
+# Keep this manually generated so that it doesn't build-dep on
+# 'linux-headers' and stays predictable.
+
+key-constants: /usr/include/linux/input.h debian/addons/build/aliased-keys
+	test -f $<
+	echo -n '# Generated from $< dated ' > $@
+	date -r $< >> $@
+	awk '/#define  *KEY_/{if(strtonum($$3) <= 255) print $$2"="strtonum($$3)}' $< | sort -nt'=' -k2 >> $@
+	test -f debian/addons/build/aliased-keys && cat debian/addons/build/aliased-keys >> $@
+
--- acpi-support-0.142.orig/debian/source/format
+++ acpi-support-0.142/debian/source/format
@@ -0,0 +1 @@
+1.0
--- acpi-support-0.142.orig/debian/watch
+++ acpi-support-0.142/debian/watch
@@ -0,0 +1,2 @@
+version=2
+http://archive.ubuntu.com/ubuntu/pool/main/a/acpi-support/acpi-support_(.*).tar.gz
