Please try the following patch against the original ususpend
scriptlet (the one provided by the package):

Index: scriptlets.d/ususpend
===================================================================
--- scriptlets.d/ususpend       (revision 1133)
+++ scriptlets.d/ususpend       (working copy)
@@ -6,6 +6,7 @@
 
 AddConfigHelp "USuspendMethod <disk|ram|both>" "Enables use of the uswsusp 
suspend method of newer kernels (>= 2.6.17rc1)"
 AddConfigHelp "USuspendRamForce <boolean>" "Passes the -f flag to s2ram to 
force suspending even if the machine is not recognised"
+AddConfigHelp "USuspendRamUnsureOk <boolean>" "Instructs s2ram to continue 
when it's unsure about the system type, thus not requiring -f to be passed"
 AddConfigHelp "USuspendRamVbeSave <boolean>" "Passes the -s flag to s2ram to 
save VBE state before suspending and restore after resume"
 AddConfigHelp "USuspendRamVbePost <boolean>" "Passes the -p flag to s2ram to 
VBE POST the graphics card after resume"
 AddConfigHelp "USuspendRamVbeMode <boolean>" "Passes the -m flag to s2ram to 
get VBE mode before suspend and set it after resume"
@@ -18,6 +19,7 @@
 USUSPEND_DEVICE=/dev/snapshot
 USUSPEND_PROG=s2disk
 USUSPEND_RAM_FORCE=0
+USUSPEND_RAM_UNSUREOK=0
 USUSPEND_RAM_VBESAVE=0
 USUSPEND_RAM_VBEPOST=0
 USUSPEND_RAM_VBEMODE=0
@@ -49,6 +51,9 @@
        ususpendramforce)
            BoolIsOn "$1" "$2" && USUSPEND_RAM_FORCE=1 || return 0
            ;;
+       ususpendramunsureok)
+           BoolIsOn "$1" "$2" && USUSPEND_RAM_UNSUREOK=1 || return 0
+           ;;
        ususpendramvbesave)
            BoolIsOn "$1" "$2" && USUSPEND_RAM_VBESAVE=1 || return 0
            ;;
@@ -110,10 +115,21 @@
        vecho 0 "$USUSPEND_PROG not installed."
        return 2
     fi
-    if [ "$USUSPEND_PROG" = s2ram ] && [ $USUSPEND_RAM_FORCE -eq 0 ] \
-           && ! $USUSPEND_PROG -n >/dev/null; then
-       vecho 0 "$USUSPEND_PROG: unknown machine, see s2ram(8) and the 
USuspendRamForce option"
-       return 2
+    if [ "$USUSPEND_PROG" = s2ram ] && [ $USUSPEND_RAM_FORCE -eq 0 ]; then
+       USUSPEND_PROG -n >/dev/null
+       ret=$?
+       case "$ret/$USUSPEND_RAM_UNSUREOK" in
+           0/*) :;;
+           32/1) :;; # unsure, but USuspendRamUnsureOk passed
+           32/*)
+               vecho 0 "$USUSPEND_PROG: unsure about your machine, see the 
USuspendRamUnsureOk option"
+               return 2
+               ;;
+           *)
+               vecho 0 "$USUSPEND_PROG: unknown machine, see s2ram(8) and the 
USuspendRamForce option"
+               return 2
+               ;;
+       esac
     fi
     if ! test -f $USUSPEND_STATE_FILE ; then
        vecho 0 "Your kernel does not have power management built in."

-- 
 .''`.   martin f. krafft <[EMAIL PROTECTED]>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems

Attachment: signature.asc
Description: Digital signature (GPG/PGP)

Reply via email to