Package: pm-utils
Version: 1.4.1-21
Severity: important
Dear Maintainer,
* What led up to the situation?
Install molly-guard:
ii molly-guard 0.8.4
* What exactly did you do (or not do) that was effective (or
ineffective)?
With molly-guard installed, /sbin/pm-suspend is replaced:
~# ll /sbin/pm-suspend*
lrwxrwxrwx 1 root root 30 9. Mär 22:38 /sbin/pm-suspend ->
../lib/molly-guard/molly-guard*
lrwxrwxrwx 1 root root 30 9. Mär 22:38 /sbin/pm-suspend-hybrid ->
../lib/molly-guard/molly-guard*
lrwxrwxrwx 1 root root 31 26. Jan 12:14
/sbin/pm-suspend-hybrid.no-molly-guard -> /usr/lib/pm-utils/bin/pm-action*
lrwxrwxrwx 1 root root 31 26. Jan 12:14 /sbin/pm-suspend.no-molly-guard ->
/usr/lib/pm-utils/bin/pm-action*
* What was the outcome of this action?
Calling /sbin/pm-suspend.no-molly-guard is not suspending the system.
* What outcome did you expect instead?
Calling /sbin/pm-suspend.no-molly-guard should suspend the system.
Rationale:
molly-guard will create symlinks upon installation. These symlinks may be
used in cirumstances. pm-action is not aware of those links and fails
to suspend.
With the patch supplied below pm-action is molly-guard-aware and the
/sbin/pm-suspend.no-molly-guard link is usable to suspend the system.
proposed PATCH:
--- /usr/lib/pm-utils/bin/pm-action 2024-05-22 10:25:03.506813817 +0200
+++ /usr/lib/pm-utils/bin/pm-action.bkp 2024-05-22 10:24:11.605425986 +0200
@@ -26,7 +26,7 @@
# The rule here? Simplicity.
export STASHNAME=pm-suspend
-export METHOD="$(echo ${0##*pm-} |tr - _)"
+export METHOD="$(echo ${0##*pm-} | sed 's/\.no-molly-guard//g' |tr - _)"
. "/usr/lib/pm-utils/pm-functions"
# return code tracking for when suspend fails
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.0.0-2-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages pm-utils depends on:
ii powermgmt-base 1.37
-- no debconf information