Package: hal
Version: 0.5.7-2
Severity: wishlist
Tags: patch

Since a few weeks the uswsusp package is in the archive, it can use 
userspace software suspend present in recent kernels. For this to work
with a gnome system (via g-p-m and ultimately hal) a few additions
are needed to the scripts in /usr/share/hal/scripts.

I'll attach a simple patch that makes these script use s2disk or s2both
in case of hibernate / suspend if available and 'higher level' programs 
like powersave and hibernate are not.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (60, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.1
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8) (ignored: LC_ALL 
set to nl_NL.utf8)

Versions of packages hal depends on:
ii  adduser                       3.95       Add and remove users and groups
ii  dbus                          0.62-4     simple interprocess messaging syst
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries
ii  libdbus-1-2                   0.62-4     simple interprocess messaging syst
ii  libdbus-glib-1-2              0.62-4     simple interprocess messaging syst
ii  libexpat1                     1.95.8-3.2 XML parsing C library - runtime li
ii  libglib2.0-0                  2.10.3-3   The GLib library of C routines
ii  libhal1                       0.5.7-2    Hardware Abstraction Layer - share
ii  libusb-0.1-4                  2:0.1.12-2 userspace USB programming library
ii  lsb-base                      3.1-10     Linux Standard Base 3.1 init scrip
ii  pciutils                      1:2.2.1-2  Linux PCI Utilities
ii  udev                          0.093-1    /dev/ and hotplug management daemo
ii  usbutils                      0.72-4     USB console utilities

hal recommends no packages.

-- no debconf information
--- hal-system-power-hibernate  2006-06-27 08:21:54.000000000 +0200
+++ hal-system-power-hibernate  2006-08-09 14:39:42.000000000 +0200
@@ -43,6 +43,10 @@
                # Suspend2 tools installed
                /usr/sbin/hibernate --force
                RET=$?
+       elif [ -x "/usr/sbin/s2disk" ] ; then
+               # uswsusp tools installed
+               /usr/sbin/s2disk
+               RET=$?
        elif [ -w "/sys/power/state" ] &&
        [  "$HAL_PROP_POWER_MANAGEMENT_TYPE" != pmu ] ; then
                # Use the raw kernel sysfs interface if possible (not on pmu 
yet)
--- hal-system-power-suspend    2006-08-09 14:40:05.000000000 +0200
+++ hal-system-power-suspend    2006-08-09 14:41:35.000000000 +0200
@@ -57,6 +57,9 @@
        elif [ -x "/usr/sbin/pmi" ] ; then
            /usr/sbin/pmi action suspend force
            RET=$?
+       elif [ -x "/usr/sbin/s2both" ] ; then
+           /usr/sbin/s2both
+           RET=$?
        elif  [ "$HAL_PROP_POWER_MANAGEMENT_TYPE" = "pmu" ]; then
                #PMU systems cannot use /sys/power/state yet, so use a helper 
to issue an ioctl
                hal-system-power-pmu sleep

Reply via email to