Package: acpid
Version: 1.0.4
Severity: minor
Tags: patch
Hi,
the attached patch makes the acpid init.d script lsb-compliant by using
lsb logging functions and return values.
Regards,
David
diff -ur ./acpid-1.0.4.orig/debian/acpid.init.d
./acpid-1.0.4/debian/acpid.init.d
--- ./acpid-1.0.4.orig/debian/acpid.init.d 2006-08-26 00:15:39.000000000
+0200
+++ ./acpid-1.0.4/debian/acpid.init.d 2006-08-26 01:02:40.000000000 +0200
@@ -1,5 +1,7 @@
#! /bin/sh -e
+. /lib/lsb/init-functions
+
# Check for daemon presence
test -x /usr/sbin/acpid || exit 0
@@ -31,26 +33,29 @@
fi
if [ -n "$MODULES" ]; then
- echo "Loading ACPI modules:"
+ log_action_begin_msg "Loading ACPI modules"
for mod in $MODULES; do
echo $MODAVAIL | grep -q -w "$mod" || continue
- echo " $mod"
+ if [ "$VERBOSE" != "no" ]; then
+ log_action_cont_msg "$mod"
+ fi
echo $LIST | grep -q -w "$mod" || modprobe $mod ||
/bin/true
done
+ log_action_end_msg 0
fi
}
case "$1" in
start)
[ -f /proc/modules ] && load_modules
- echo -n "Starting Advanced Configuration and Power Interface daemon: "
+ log_daemon_msg "Starting Advanced Configuration and Power Interface
daemon" "acpid"
start-stop-daemon --start --quiet --exec /usr/sbin/acpid -- -c
/etc/acpi/events $OPTIONS
- echo "acpid."
+ log_end_msg 0
;;
stop)
- echo -n "Stopping Advanced Configuration and Power Interface daemon: "
+ log_daemon_msg "Stopping Advanced Configuration and Power Interface
daemon" "acpid"
start-stop-daemon --stop --quiet --oknodo --retry 2 --exec /usr/sbin/acpid
- echo "acpid."
+ log_end_msg 0
;;
restart)
$0 stop
@@ -58,12 +63,15 @@
$0 start
;;
reload|force-reload)
- echo "Reloading Advanced Configuration and Power Interface daemon
configuration files"
+ log_action_msg "Reloading Advanced Configuration and Power Interface
daemon configuration files"
start-stop-daemon --stop --signal 1 --exec /usr/sbin/acpid
;;
+ status)
+ exit 4
+ ;;
*)
echo "Usage: /etc/init.d/acpid {start|stop|restart|reload|force-reload}"
- exit 1
+ exit 2
esac
exit 0
diff -ur ./acpid-1.0.4.orig/debian/control ./acpid-1.0.4/debian/control
--- ./acpid-1.0.4.orig/debian/control 2006-08-26 00:15:39.000000000 +0200
+++ ./acpid-1.0.4/debian/control 2006-08-26 00:18:58.000000000 +0200
@@ -7,7 +7,7 @@
Package: acpid
Architecture: i386 ia64 amd64
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, lsb-base (>= 3.0-10)
Description: Utilities for using ACPI power management
Modern computers support the Advanced Configuration and Power Interface (ACPI)
to allow intelligent power management on your system and to query battery and