Package: acpi-support
Version: 0.130-1
Severity: wishlist
Tags: patch

Hi.

Please consider the attached patch for inclusion with your next update;
it changes the init script to use the log_action_* class of logging
functions rather than just log_*. In particular this means that when
uinput is not present on the system then only one completion message
(the failure) is printed for acpi_fakekey rather than a failure and then
a success.

System I'm sending this from is running testing, but patch is against
0.131-5 from unstable.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (750, 'testing'), (500, 'testing-proposed-updates')
Architecture: i386 (i686)

Kernel: Linux 2.6.32.2 (PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages acpi-support depends on:
ii  acpi-support-base             0.130-1    scripts for handling base ACPI eve
ii  acpid                         1:2.0.0-1  Advanced Configuration and Power I
ii  dmidecode                     2.9-1.2    Dump Desktop Management Interface 
ii  finger                        0.17-13    user information lookup program
ii  hdparm                        9.15-1     tune hard disk parameters for high
ii  laptop-detect                 0.13.7     attempt to detect a laptop
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries
ii  lsb-base                      3.2-23     Linux Standard Base 3.2 init scrip
ii  pm-utils                      1.2.6.1-3  utilities and scripts for power ma
ii  powermgmt-base                1.31       Common utils and configs for power
ii  x11-xserver-utils             7.5+1      X server utilities

Versions of packages acpi-support recommends:
ii  dbus                          1.2.16-2   simple interprocess messaging syst
ii  hal                           0.5.14-1   Hardware Abstraction Layer
pn  nvclock                       <none>     (no description available)
ii  radeontool                    1.5-5      utility to control ATI Radeon back
pn  toshset                       <none>     (no description available)

acpi-support suggests no packages.

-- no debconf information
diff -ru acpi-support-0.131.orig/debian/acpi-support.init acpi-support-0.131/debian/acpi-support.init
--- acpi-support-0.131.orig/debian/acpi-support.init	2010-01-06 17:38:38.000000000 +0800
+++ acpi-support-0.131/debian/acpi-support.init	2010-01-06 19:05:12.000000000 +0800
@@ -24,23 +24,23 @@
 
 case "$1" in
   start)
-    log_begin_msg "Starting acpi_fakekey daemon..."
+    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_failure_msg "No suitable uinput module for running kernel found"
+			log_action_end_msg 1 "No suitable uinput module for running kernel found"
 		else
-			log_failure_msg "Modprobe uinput failed. Please use 'dmesg' to find out why"
+			log_action_end_msg 1 "Modprobe uinput failed. Please use 'dmesg' to find out why"
 		fi
 	fi
     fi
 
     if [ -d /sys/devices/virtual/misc/uinput ]; then
 	acpi_fakekeyd
+	log_action_end_msg 0
     fi
 
-    log_end_msg 0
-    log_begin_msg "Checking battery state..."
+    log_action_begin_msg "Checking battery state"
     if [ x"`echo /proc/acpi/ac_adapter/*`" != x"/proc/acpi/ac_adapter/*" ]; then 
 	/etc/acpi/power.sh
     fi
@@ -50,14 +50,14 @@
   	  . $SCRIPT
   	fi
     done
-    log_end_msg 0
+    log_action_end_msg 0
     ;;
   stop)
-    log_begin_msg "Disabling power management..."
+    log_action_begin_msg "Disabling power management"
     if [ x"`echo /proc/acpi/ac_adapter/*`" != x"/proc/acpi/ac_adapter/*" ]; then
 	/etc/acpi/power.sh false
     fi
-    log_end_msg 0
+    log_action_end_msg 0
     ;;
   restart|force-reload)
     # Doesn't make sense for that package

Reply via email to