--- laptop-mode-tools-1.34.orig/debian/compat +++ laptop-mode-tools-1.34/debian/compat @@ -0,0 +1 @@ +4 --- laptop-mode-tools-1.34.orig/debian/changelog +++ laptop-mode-tools-1.34/debian/changelog @@ -0,0 +1,400 @@ +laptop-mode-tools (1.34-1ubuntu1) gutsy; urgency=low + + * Merge from debian unstable, remaining changes: + - etc/init.d/laptop-mode: Check if laptop mode is disabled in + /etc/default/laptop-mode (that's the file laptop_mode looks into, too, + but it incorrectly evaluates the ENABLE_LAPTOP_MODE setting) as well + as in /etc/default/acpi-support. + - Add debian/laptop-mode-tools.postinst: Create /etc/default/laptop-mode + (with ENABLE_LAPTOP_MODE=false) if the file does not exist yet and we + are on ppc. + - /usr/sbin/laptop_mode: Do not parse arguments, ignore "force" and + "init" and let start/stop mean enable/disable. + - /usr/sbin/laptop_mode: Do not read $ACTIVATE_WITH_POSSIBLE_DATA_LOSS + from /var/run/laptop-mode-state to see if state has changed. + + -- Tormod Volden Wed, 30 May 2007 22:30:20 +0100 + +laptop-mode-tools (1.34-1) unstable; urgency=low + + * New upstream version 1.34. + * (Closes: #425387) Ignore_nice_load now set also for governors other than + ondemand. + * (Closes: #425957) Got rid of error message when CPU frequency governor is + not compiled as a module. + * (Closes: #425551) Support for Intel IPW3945, IPW2200, IPW2100 wireless + power setting. + * Modular configuration file in /etc/laptop-mode/conf.d. + * First version of a modularized architecture. + * Support for custom modules in /etc/laptop-mode/modules. + + -- Bart Samwel Mon, 28 May 2007 17:15:00 +0100 + +laptop-mode-tools (1.33-1) unstable; urgency=low + + * New upstream version 1.33. + * (Closes: #394557) PARTITIONS configuration setting now supports wildcards + (thanks to Mikko Rapeli). + * (Closes: #398179) When using pbbuttonsd, laptop-mode is now automatically + reinitialized on resume. + * (Closes: #389218) CPU frequency settings are now applied to all cores, not + just the first one. (This was actually already fixed in 1.32, this + changelog entry is for the record.) + * (Closes: #423853) Laptop mode init script sequence number increased, so + that *-stop and *-start scripts are done after all other init scripts have + completed. + * (Closes: #416445) A new option allows for controlling the ignore_nice_load + setting of the ondemand and conservative CPU frequency governors. + * Backported Ubuntu's diff that supports the acpi-support package. + + -- Bart Samwel Sat, 19 May 2007 20:00:00 +0100 + +laptop-mode-tools (1.32-1ubuntu1) feisty; urgency=low + + * Merge from debian unstable; remaining Ubuntu changes: + + -- Martin Pitt Wed, 6 Dec 2006 12:53:23 +0100 + +laptop-mode-tools (1.32-1) unstable; urgency=low + + * New upstream version 1.32. + * (Closes: #366220) Modprobe frequency governor before using it. + * (Closes: #370118) Correctly restore mount options. + * (Closes: #384899) Added LSB logging for init script. Added dependency to lsb-base. + + -- Bart Samwel Fri, 6 Oct 2006 12:00:00 +0200 + +laptop-mode-tools (1.31-1ubuntu4) edgy; urgency=low + + * Disable laptop mode by default on powerpc. On i386/amd64 is disabled by + default in /etc/default/acpi-support), but acpi-support does not exist on + powerpc. This will prevent 'kill my hard disk' bugs like #29529 to happen + to users who are unaware of laptop-mode. + - etc/init.d/laptop-mode: Check if laptop mode is disabled in + /etc/default/laptop-mode (that's the file laptop_mode looks into, too, + but it incorrectly evaluates the ENABLE_LAPTOP_MODE setting). + - Add debian/laptop-mode-tools.postinst: Create /etc/default/laptop-mode + (with ENABLE_LAPTOP_MODE=false) if the file does not exist yet and we + are on ppc. + + -- Martin Pitt Fri, 6 Oct 2006 14:26:51 +0200 + +laptop-mode-tools (1.31-1ubuntu3) edgy; urgency=low + + * Remove debugging spew + + -- Matthew Garrett Wed, 20 Sep 2006 21:16:09 +0100 + +laptop-mode-tools (1.31-1ubuntu2) edgy; urgency=low + + * Beat up laptop_mode until it does what we want it to (ie, start or + stop based on our instructions, not depending on its own ideas) + + -- Matthew Garrett Wed, 20 Sep 2006 21:14:30 +0100 + +laptop-mode-tools (1.31-1ubuntu1) edgy; urgency=low + + * Sync with Debian. + + -- Tollef Fog Heen Mon, 10 Jul 2006 13:42:58 +0200 + +laptop-mode-tools (1.31-1) unstable; urgency=low + + * New upstream version 1.31. + * (Closes: #354751) Depended on gawk, now works with any awk. + * (Closes: #356553) Add /dev/mapper/* to default partitions list. + * (Closes: #362261) Strip ^M from various files. + + -- Bart Samwel Sun, 17 Apr 2006 03:00:00 +0200 + +laptop-mode-tools (1.30-1) unstable; urgency=low + + * New upstream version 1.30. + * Included FAQ and revision history as text documentation as well. + * (Closes: #353567) Writecache was disabled when laptop mode was + disabled. Thanks to Chung-chieh Shan (AKA Ken) for the patch. + + -- Bart Samwel Thu, 23 Feb 2006 19:20:00 +0200 + +laptop-mode-tools (1.27-1) unstable; urgency=low + + * New upstream version 1.27. + * Additional fixes for #350518 and #351351. + * (Closes: #353028) In laptop-mode.conf, the fastest processor speed + was called "highest" while it should have been "fastest". + * (Closes: #351597) Fixed incorrect references to "X-Windows". Not in + the revision history because that is history, and history can't be + changed. :-) + * (Closes: #353027, #352647) Data loss sensitive features not disabled + when battery reports a discharge rate. + * Included FAQ and revision history as documentation. + + -- Bart Samwel Sat, 18 Feb 2006 12:45:00 +0200 + +laptop-mode-tools (1.23-1) unstable; urgency=low + + * New upstream version 1.23. + * (Closes: #350518) Fixed auto-hibernation. + * (Closes: #350520) Cleared up relationship between CONTROL_CPU_FREQUENCY + and the CPU governor settings in the laptop-mode.conf manpage. + * (Closes: #350983) Fixed media detection code that uses udevinfo. + * (Closes: #351351) Fixed handling of double battery slots. + + -- Bart Samwel Sat, 04 Feb 2006 13:30:00 +0200 + +laptop-mode-tools (1.22-1) unstable; urgency=low + + * New upstream version 1.22. + * (Closes: #350278) Fixed typo that broke terminal powerdown control. + * (Closes: #350280) Create batt-start/stop etc. config directories + in proper place (/etc/laptop-mode) instead of below the root. + + -- Bart Samwel Sat, 28 Jan 2006 16:45:00 +0200 + +laptop-mode-tools (1.21-1) unstable; urgency=low + + * New upstream version 1.21. + * Fixed some installation issues. + * Fixed package description. + * Fixed kernel version detection. + * Restart service on upgrade. + + -- Bart Samwel Thu, 26 Jan 2006 14:40:00 +0200 + +laptop-mode-tools (1.20-1) unstable; urgency=low + + * New upstream version 1.20. + * (Closes: #345417) When stopping laptop-mode-tools, the syslog.conf is + always restored as a normal file. Only when the laptop-mode service is + started is the syslog.conf replaced by a link (of course only when + CONTROL_SYSLOG_CONF is enabled). + * (Closes: #341057) Typo fixed. + * (Closes: #348923) Laptop mode's output no longer truncates acpid's log + file. More of a bug in acpid, but it's nice to have it fixed. + * (Closes: #341322) Modified BIT FAT WARNING to indicate solution better. + * (Closes: #343967) Incorporated patch that should make DPMS standby + control work properly. + * (Closes: #345521) Fixed incorrect path in log message. + * (Closes: #345523) Fixed typo in config Shoudl -> Should. + * (Closes: #345808) Default for CONTROL_NOATIME set to 0. + * Create batt-start/stop, lm-ac-start/stop and nolm-ac-start/stop + directories at install time. + * Adjusted package description so that newer features are also mentioned. + * Support for sdparm (SCSI drives) added. + * Added dependency on sdparm. + * Removed dependency on powermgmt-base, as the package doesn't make use of + on_ac_power anymore. + + -- Bart Samwel Wed, 25 Jan 2006 16:50:00 +0200 + +laptop-mode-tools (1.11-1ubuntu3) dapper; urgency=low + + * Don't start laptop-mode on startup if it's disabled in the global + config + * Fix typo that prevented CPU governor setting + + -- Matthew Garrett Fri, 5 May 2006 20:47:05 +0100 + +laptop-mode-tools (1.11-1ubuntu2) dapper; urgency=low + + * Disable write caching by default + + -- Matthew Garrett Sun, 30 Apr 2006 19:11:00 +0100 + +laptop-mode-tools (1.11-1ubuntu1) dapper; urgency=low + + * Don't ship acpi scripts (we handle that ourselves) + + -- Matthew Garrett Tue, 29 Nov 2005 17:27:51 +0000 + +laptop-mode-tools (1.11-1) unstable; urgency=low + + * New upstream version 1.11. + * (Closes: #328118) Unset VERBOSE before starting. + * (Closes: #328432) Check if block device is block device before + treating it as such. + * (Closes: #335492, #326433) Check if /var/run/laptop-mode-nolm-mount-opts + exists before using it. + * (Closes: #325186) Change default for CONTROL_HD_POWERMGMT to 0, because + it causes system crashes on some hardware. + * (Closes: #328028) Check if hdparm is installed before using it. + * (Closes: #324457) Fit config file in 80-character screen. + * (Closes: #327028) Check whether requested state matches old state, + and do nothing if so. + * (Closes: #336294) Send error output of hdparm to /dev/null. + * (Closes: #323623) CPU frequency governor and minimum frequency control. + * (Closes: #324137) Add lm-profiler, accompanying config file + lm-profiler.conf, and several subdirectories to /etc/laptop-mode for + controlling daemons. + + -- Bart Samwel Sat, 29 Oct 2005 16:40:00 +0200 + +laptop-mode-tools (1.10-1) unstable; urgency=low + + * New upstream version 1.10. + * (Closes: #321877) Typo fixed. + * (Closes: #323019) Default for HD powermgmt NOLM was wrong. + * (Closes: #322867) Verbose output was incorrectly enabled by default. + + -- Bart Samwel Sun, 14 Aug 2005 12:46:00 +0200 + +laptop-mode-tools (1.09-1) unstable; urgency=low + + * New upstream version 1.09. + * Closing a number of bugs that ought to have been closed by + 1.06 which was never uploaded. + * (Closes: #274836) Disables write caches by default when laptop mode is + enabled. + * (Closes: #315451) Support for fallbacks in file system types, e.g. + "ext3,ext2". + * (Closes: #317554) apmd AND acpid dependency replaced by apmd OR acpid. + * (Closes: #322144) init script output not sent to /dev/null anymore. + + -- Bart Samwel Tue, 09 Aug 2005 21:22:00 +0200 + +laptop-mode-tools (1.08-1) unstable; urgency=low + + * New upstream version 1.08. + + -- Bart Samwel Thu, 04 Aug 2005 15:43:00 +0200 + +laptop-mode-tools (1.07-1) unstable; urgency=low + + * New upstream version 1.07. + * Fixes breakage caused by 1.06 release. + + -- Bart Samwel Fri, 29 Jul 2005 19:18:00 +0200 + +laptop-mode-tools (1.06-1) unstable; urgency=low + + * New upstream version 1.06. + * (Closes: #274836) Disables write caches by default when laptop mode is + enabled. + * (Closes: #315451) Support for fallbacks in file system types, e.g. + "ext3,ext2". + * (Closes: #317554) apmd AND acpid dependency replaced by apmd OR acpid. + + -- Bart Samwel Thu, 28 Jul 2005 13:07:00 +0200 + +laptop-mode-tools (1.05-1) unstable; urgency=low + + * New upstream version 1.05. + * (Closes: #294064) No longer fails when ACPI ac_adapter did not have a + power state. + * (Closes: #271362) All power management daemons are now Recommended, as + a result of the addition of integration with pbbuttonsd and pmud. + * (Closes: #290441) Restart acpid after installing / uninstalling. + * (Closes: #291594) Integration with pbbuttonsd has changed, please + reopen bug if the problem persists. + * (Closes: #302550, #302571, #273386) Native pbbuttonsd and pmud integration. + * (Closes: #282291) READAHEAD default is now 3072 or 3MB. + * (Closes: #288128) Typos in config file fixed. + + -- Bart Samwel Sun, 10 Apr 2005 17:00:00 +0200 + +laptop-mode-tools (1.04-1) unstable; urgency=medium + + * New upstream version 1.04. + * (Closes: #278673) Fix PMU power detection logic. + * (Closes: #274383) Support / in mount options. + * (Closes: #279051, #279053) General manpage cleanup. + * (Closes: #278960) Add syslogd config switching support (no manpage yet, + see config file and run /usr/sbin/lm-syslog-setup). + + -- Bart Samwel Tue, 9 Nov 2004 23:46:00 +0200 + +laptop-mode-tools (1.03-1) unstable; urgency=low + + * New upstream version 1.03. + * (Closes: #278456) Works on APM again. Thanks Chung-chieh Shan! + * (Closes: #278145) This bug was already resolved by 1.01, by the + AC_HD_WITH_LM/AC_HD_WITHOUT_LM split. + * (Closes: #278144) Fixed the incorrect description of a default + in the config file. + + -- Bart Samwel Wed, 27 Oct 2004 08:38:00 +0200 + +laptop-mode-tools (1.01-2) unstable; urgency=low + + * Re-upload, this time without mistakenly overriding the maintainer + field, so that bugs are properly closed. + + -- Chris Hanson Tue, 26 Oct 2004 00:13:18 -0400 + +laptop-mode-tools (1.01-1) unstable; urgency=low + + * New upstream version 1.01. + * (Closes: #270501) ACPI_WITHOUT_AC_EVENTS calls other script with correct + path now. + * (Closes: #271127) Added dependency on hdparm. + * (Closes: #273104) -B option made configurable using new configuration + settings BATT_HDPARM_POWERMGMT, AC_HDPARM_POWERMGMT_WITH_LM and + AC_HDPARM_POWERMGMT_WITHOUT_LM. Also, switched the order in which -B + and -S options are applied, so that the -S option always overrules any + effect -B has on the -S setting. -B can also be disabled using the + DO_HDPARM_POWERMGMT option. + * (Closes: #272912) Updated config file and manual page with correct + default values. + + -- Bart Samwel Sun, 3 Oct 2004 14:42:00 +0200 + +laptop-mode-tools (1.00-1) unstable; urgency=low + + * New upstream version 1.00. + * (Closes: #267043) Configuration flag ACPI_WITHOUT_AC_EVENTS added. + * (Closes: #269667) /var/run/laptop-mode-enabled controls laptop mode, so + that it is never started when /etc/init.d/laptop-mode has been stopped. + + -- Bart Samwel Wed, 18 Aug 2004 20:44:00 +0200 + +laptop-mode-tools (0.99-2) unstable; urgency=low + + * Included changelog entries to close bugs in correct format. + * Added powermgmt-base to dependencies. + * Removed unneeded dependencies. + * (Closes: #266706) DO_CPU is no more ignored. + * (Closes: #266512) on_ac_power is now used to detect power source. + * (Closes: #266643) Fixed division by 0 in lm_battery.sh. + + -- Bart Samwel Wed, 18 Aug 2004 20:44:00 +0200 + +laptop-mode-tools (0.99-1) unstable; urgency=low + + * New upstream version 0.99. + * Fixes #266706. + + -- Bart Samwel Wed, 18 Aug 2004 20:44:00 +0200 + +laptop-mode-tools (0.98-1) unstable; urgency=low + + * New upstream version 0.98. + * Fixes #266512 and #266643. + + -- Bart Samwel Wed, 18 Aug 2004 20:44:00 +0200 + +laptop-mode-tools (0.97-1) unstable; urgency=low + + * New upstream version 0.97. + + -- Bart Samwel Sat, 13 Aug 2004 14:06:00 +0200 + +laptop-mode-tools (0.95-1) unstable; urgency=low + + * Move Debian stuff out of upstream into separate diff. This changelog + will only report the Debian-related fixes from now on. + + -- Bart Samwel Sat, 31 Jul 2004 17:05:00 +0200 + +laptop-mode-tools (0.94-2) unstable; urgency=low + + * Fix feedback from lintian. + + -- Bart Samwel Thu, 29 Jul 2004 17:22:00 +0200 + +laptop-mode-tools (0.94-1) unstable; urgency=low + + * Initial release. + * Debianization included in upstream package. + + -- Bart Samwel Thu, 29 Jul 2004 01:01:32 +0200 + --- laptop-mode-tools-1.34.orig/debian/laptop-mode-tools.postinst.checkacpiorapm +++ laptop-mode-tools-1.34/debian/laptop-mode-tools.postinst.checkacpiorapm @@ -0,0 +1,57 @@ +#! /bin/sh + +# Watch out: we also check for the nonexistence of /proc/pmu because +# some kernel versions emulate /proc/apm for PMU hardware. +if [ ! -f /proc/apm -o -d /proc/pmu ] ; then + APM_FOUND=0 +elif [ ! -f /usr/sbin/apmd] ; then + echo APM support found in the kernel but apmd is not installed. Laptop mode + echo will NOT be enabled automatically using APM. + APM_FOUND=1 +else + APM_FOUND=1 +fi + +if [ ! -d /proc/acpi/ac_adapter ] ; then + ACPI_FOUND=0 +elif [ ! -f /usr/sbin/acpid ] ; then + echo ACPI support found in the kernel, but acpid is not installed. Laptop mode + echo will NOT be enabled automatically using ACPI. + ACPI_FOUND=1 +else + ACPI_FOUND=1 +fi + +if [ ! -d /proc/pmu ] ; then + PMU_FOUND=0 +elif [ ! -f /sbin/pmud -a ! -f /sbin/pbbuttonsd ] ; then + echo PMU support found in the kernel, but neither pmud nor pbbuttonsd is + echo installed. Laptop mode will NOT be enabled automatically. If you want + echo to start laptop mode automatically, install either pmud or pbbuttonsd, + echo and then *manually* edit /etc/power/pwrctl-local to call + echo "/usr/sbin/laptop_mode auto". + PMU_FOUND=1 +else + PMU_FOUND=1 +fi + +if [ $PMU_FOUND -ne 0 -a -f /etc/apm/event.d/laptop-mode ] ; then + # This is a HACK. We install the apm thing always but simply remove + # it afterwards. I haven't found out how to make dpkg install these + # things conditionally (like the install.sh does) unless I take them + # out of the package and install them manually in the postinst. :( + rm /etc/apm/event.d/laptop-mode +fi + +if [ $APM_FOUND -eq 0 -a $ACPI_FOUND -eq 0 -a $PMU_FOUND=0 ] ; then + echo Warning: No ACPI, APM or PMU support was found in the running kernel. To + echo be able to start laptop mode automatically when running on battery, you + echo must recompile your kernel with support for ACPI/APM/PMU (depending on + echo what your computer supports). It is possible that your computer supports + echo none of these. If this is the case, then you must control laptop mode + echo manually, using the laptop_mode command, or you can enable the + echo ENABLE_LAPTOP_MODE_ON_AC option in the configuration file + echo /etc/laptop-mode/laptop-mode.conf. +fi + +exit 0 --- laptop-mode-tools-1.34.orig/debian/dirs +++ laptop-mode-tools-1.34/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +usr/sbin +usr/lib/laptop-mode-tools/modules --- laptop-mode-tools-1.34.orig/debian/docs +++ laptop-mode-tools-1.34/debian/docs @@ -0,0 +1,3 @@ +README +Documentation/laptop-mode.txt +Documentation/revision-history.txt --- laptop-mode-tools-1.34.orig/debian/rules +++ laptop-mode-tools-1.34/debian/rules @@ -0,0 +1,109 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + + # Nothing to do. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + cp etc/init.d/laptop-mode debian/laptop-mode-tools.laptop-mode.init + touch build-stamp + +clean: + dh_testdir + dh_testroot + -rm debian/laptop-mode-tools.laptop-mode.init + -rm -f build-stamp configure-stamp + dh_clean + +DESTDIR=$(CURDIR)/debian/laptop-mode-tools + +INSTALL=install -o root -g root + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/laptop-mode-tools. + mkdir -p $(DESTDIR)/etc/laptop-mode + mkdir -p $(DESTDIR)/etc/acpi/events + mkdir -p $(DESTDIR)/etc/acpi/actions + mkdir -p $(DESTDIR)/usr/sbin + mkdir -p $(DESTDIR)/usr/lib/laptop-mode-tools/modules + mkdir -p $(DESTDIR)/etc/apm/event.d + mkdir -p $(DESTDIR)/etc/power/scripts.d + mkdir -p $(DESTDIR)/etc/power/event.d + mkdir -p $(DESTDIR)/etc/laptop-mode/batt-start + mkdir -p $(DESTDIR)/etc/laptop-mode/batt-stop + mkdir -p $(DESTDIR)/etc/laptop-mode/lm-ac-start + mkdir -p $(DESTDIR)/etc/laptop-mode/lm-ac-stop + mkdir -p $(DESTDIR)/etc/laptop-mode/nolm-ac-start + mkdir -p $(DESTDIR)/etc/laptop-mode/nolm-ac-stop + mkdir -p $(DESTDIR)/etc/laptop-mode/conf.d + mkdir -p $(DESTDIR)/etc/laptop-mode/modules + install -m600 etc/laptop-mode/laptop-mode.conf $(DESTDIR)/etc/laptop-mode/laptop-mode.conf + install -m600 etc/laptop-mode/conf.d/* $(DESTDIR)/etc/laptop-mode/conf.d + install -m700 etc/acpi/actions/* $(DESTDIR)/etc/acpi/actions + install -m600 etc/acpi/events/* $(DESTDIR)/etc/acpi/events + install -m700 etc/apm/event.d/* $(DESTDIR)/etc/apm/event.d + install -m700 etc/power/scripts.d/* $(DESTDIR)/etc/power/scripts.d + install -m700 etc/power/event.d/* $(DESTDIR)/etc/power/event.d + install -m700 usr/sbin/laptop_mode $(DESTDIR)/usr/sbin + install -m700 usr/sbin/lm-syslog-setup $(DESTDIR)/usr/sbin + install -m700 usr/sbin/lm-profiler $(DESTDIR)/usr/sbin + install -m700 usr/lib/laptop-mode-tools/modules/* $(DESTDIR)/usr/lib/laptop-mode-tools/modules + +# Build architecture-independent files here. +binary-arch: build install + +# Build architecture-dependent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs Documentation/revision-history.txt + dh_installdocs +# dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime + dh_installinit --name laptop-mode -- defaults 99 +# dh_installcron +# dh_installinfo + dh_installman man/* +# dh_link +# dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb +# dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- laptop-mode-tools-1.34.orig/debian/control +++ laptop-mode-tools-1.34/debian/control @@ -0,0 +1,23 @@ +Source: laptop-mode-tools +Section: utils +Priority: optional +Maintainer: Bart Samwel +Build-Depends: debhelper (>= 4.0.0) +Standards-Version: 3.6.2.1 + +Package: laptop-mode-tools +Architecture: all +Depends: lsb-base (>= 3.0-10) +Recommends: acpid | apmd | pbbuttonsd | pmud, hdparm, sdparm +Conflicts: noflushd +Description: Scripts to spin down hard drive and save power + Laptop mode is a Linux kernel feature that allows your laptop to save + considerable power, by allowing the hard drive to spin down for longer + periods of time. This package contains the userland scripts that are + needed to enable laptop mode. It includes support for automatically + enabling laptop mode when the computer is working on batteries. It also + supports various other power management features, such as starting and + stopping daemons depending on power mode, automatically hibernating if + battery levels are too low, and adjusting terminal blanking and X Windows + screen blanking. + --- laptop-mode-tools-1.34.orig/debian/copyright +++ laptop-mode-tools-1.34/debian/copyright @@ -0,0 +1,20 @@ +This package was debianized by Bart Samwel on +Thu, 29 Jul 2004 01:01:32 +0200. + +The upstream author is Bart Samwel, who has also done the debianization. + +The website for the upstream package (including debianization) is + +http://samwel.tk/laptop_mode/tools + +Copyright: + +This software is copyright (c) 2004 by Bart Samwel, Kiko Piris, +Micha Feigin, Andrew Morton, Herve Eychenne, Dax Kelson, Jan Topinski + +License: + +You are free to distribute this software under the terms of +the GNU General Public License. +On Debian systems, the complete text of the GNU General Public +License can be found in the file `/usr/share/common-licenses/GPL'. --- laptop-mode-tools-1.34.orig/debian/laptop-mode-tools.postinst +++ laptop-mode-tools-1.34/debian/laptop-mode-tools.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +if [ "$1" = configure ]; then + # create a default file for disabling laptop-mode on powerpc, since there + # is no acpi-support package to do it for us + F=/etc/default/laptop-mode + if [ ! -e $F ] && [ "`uname -m`" = ppc ]; then + echo 'ENABLE_LAPTOP_MODE=false' > $F + fi +fi --- laptop-mode-tools-1.34.orig/usr/sbin/laptop_mode +++ laptop-mode-tools-1.34/usr/sbin/laptop_mode @@ -515,20 +515,20 @@ INIT=0 # Display info in init script format? FORCE=0 # Force reapplying the current state? -while [ "$1" != "" ] ; do - case "$1" in - init) INIT=1 ;; - force) FORCE=1 ;; - # Old options. We always do "auto" for any option now, but - # we still have to accept the options. - start) ;; - stop) ;; - auto) ;; - *) echo "Unrecognized option $1." - exit 1 ;; - esac - shift -done +#while [ "$1" != "" ] ; do +# case "$1" in +# init) INIT=1 ;; +# force) FORCE=1 ;; +# # Old options. We always do "auto" for any option now, but +# # we still have to accept the options. +# start) ;; +# stop) ;; +# auto) ;; +# *) echo "Unrecognized option $1." +# exit 1 ;; +# esac +# shift +#done # Used to display laptop mode state later on. This is the enabled/disabled # state for laptop mode processing, it tells us nothing about whether laptop @@ -627,8 +627,12 @@ fi fi -if [ "$STATE" == "disabled" ] ; then - ACTIVATE=0 +if [ $1 == "start" ]; then + STATE=enabled + ACTIVATE=1; +elif [ $1 == "stop" ]; then + STATE=disabled + ACTIVATE=0; fi # Check whether we are allowed to activate the data-loss-sensitive stuff. @@ -783,31 +787,6 @@ # WAS_ACTIVE is used later on. If there is no /var/run/laptop-mode-state, then # we know that laptop mode wasn't active before. WAS_ACTIVE=0 -echo Checking if desired state is different from current state. >> $OUTPUT -if [ -f /var/run/laptop-mode-state ] ; then - read WAS_ACTIVE WAS_ON_AC WAS_ACTIVATE_WITH_POSSIBLE_DATA_LOSS < /var/run/laptop-mode-state - if [ "$WAS_ON_AC" != "" ] ; then - if [ "$WAS_ACTIVE" -eq "$ACTIVATE" -a "$WAS_ON_AC" -eq "$ON_AC" -a "$WAS_ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -eq "$ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -a "$FORCE" -eq 0 ] ; then - echo -n "$STATE, " - if [ "$WAS_ACTIVE" -eq 1 ] ; then - echo -n "active [unchanged]" - if [ "$ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -eq 0 ] ; then - echo -n ' (Data-loss sensitive features disabled.)' - fi - echo - else - echo "not active [unchanged]" - fi - exit 0 - fi - else - echo "/var/run/laptop-mode-state in pre-1.20 format, ignoring previous state." >> $OUTPUT - WAS_ACTIVE=0 - fi -else - echo "/var/run/laptop-mode-state does not exist, no previous state." >> $OUTPUT -fi -echo $ACTIVATE $ON_AC $ACTIVATE_WITH_POSSIBLE_DATA_LOSS > /var/run/laptop-mode-state if [ "$ACTIVATE" -eq 1 ] ; then echo -n "$STATE, active." --- laptop-mode-tools-1.34.orig/etc/init.d/laptop-mode +++ laptop-mode-tools-1.34/etc/init.d/laptop-mode @@ -6,43 +6,70 @@ # # config: /etc/laptop-mode/laptop-mode.conf +### BEGIN INIT INFO +# Provides: laptop-mode +# Should-Start: $all +# Required-Start: $local_fs +# Required-Stop: $local_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Enable laptop-mode-tools power management functions +# Description: Enable laptop-mode-tools power management functions +### END INIT INFO + + test -f /usr/sbin/laptop_mode || exit 0 . /lib/lsb/init-functions +if [ -f /etc/default/laptop-mode ]; then + . /etc/default/laptop-mode; +fi +if [ -f /etc/default/acpi-support ]; then + . /etc/default/acpi-support; +fi + +if [ x$ENABLE_LAPTOP_MODE = xfalse ]; then + exit 0; +fi + # Enable laptop mode when the system is booted when running on battery. TEMPFILE=`mktemp` echo "Failed to start laptop mode" > $TEMPFILE -trap "log_failure_msg $( cat $TEMPFILE ) ; rm $TEMPFILE; exit 10" HUP INT ABRT QUIT SEGV TERM +trap "log_action_end_msg 10 $( cat $TEMPFILE ) ; rm $TEMPFILE; exit 10" HUP INT ABRT QUIT SEGV TERM set -e case $1 in start) + log_action_begin_msg "Enabling laptop mode" touch /var/run/laptop-mode-enabled /usr/sbin/laptop_mode auto > $TEMPFILE - log_success_msg $( cat $TEMPFILE ) + log_action_end_msg 0 $( cat $TEMPFILE ) ;; restart|reload|force-reload) + log_action_begin_msg "Disabling laptop mode" # Full restart: first stop laptop mode completely (to restore default mount options etc.) rm -f /var/run/laptop-mode-enabled /usr/sbin/laptop_mode stop > $TEMPFILE - log_success_msg $( cat $TEMPFILE ) + log_action_end_msg 0 $( cat $TEMPFILE ) + log_action_begin_msg "Enabling laptop mode" # Now remove files containing stored status, re-enable, and start it up again. rm -f /var/run/laptop-mode-* touch /var/run/laptop-mode-enabled /usr/sbin/laptop_mode auto force > $TEMPFILE - log_success_msg $( cat $TEMPFILE ) + log_action_end_msg 0 $( cat $TEMPFILE ) ;; stop) + log_action_begin_msg "Disabling laptop mode" rm -f /var/run/laptop-mode-enabled /usr/sbin/laptop_mode stop > $TEMPFILE - log_success_msg $( cat $TEMPFILE ) + log_action_end_msg 0 $( cat $TEMPFILE ) ;; status)