Package: pm-utils
Version: 1.4.1-13
Severity: normal
Tags: patch upstream

Attached patch fixes detection of userui executable when fbsplash is chosen,
to make sure VT is changed. Otherwise, when current VT is manager by X, it
hibernates without any userui and after resume, VT are in such a bad state
that X server must be restarted.

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (900, 'unstable'), (400, 'testing'), (300, 'experimental'), (200, 
'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.12.6+ (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pm-utils depends on:
ii  powermgmt-base  1.31

Versions of packages pm-utils recommends:
ii  console-tools  1:0.2.3dbs-70
ii  ethtool        1:3.4.2-1
ii  hdparm         9.43-1
ii  procps         1:3.3.4-2
pn  vbetool        <none>

Versions of packages pm-utils suggests:
pn  cpufrequtils    <none>
pn  radeontool      <none>
ii  wireless-tools  30~pre9-8

-- no debconf information
From: Julien Muchembled <[email protected]>
Date: Sun, 22 Dec 2013 23:22:28 +0100
Subject: TuxOnIce: fix support for fbsplash userui

userui now ships a single executable that takes a argument to choose between
the default text interface and fbsplash. Both of them requires chvt to be done.

$ cat /etc/pm/config.d/tuxonice-userui
TUXONICE_USERUI_PROGRAM="/usr/lib/tuxonice-userui/tuxoniceui -f"
---
 pm/module.d/tuxonice | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pm/module.d/tuxonice b/pm/module.d/tuxonice
index 05f208e..f5bfb3b 100755
--- a/pm/module.d/tuxonice
+++ b/pm/module.d/tuxonice
@@ -13,10 +13,10 @@ done
 
 if [ -n "$TUXONICE_LOC" ]; then
     toi_maybe_chvt() {
-	local toi_ui="$(cat "$TUXONICE_LOC/user_interface/program")"
-	local toi_ui_en="$(cat "$TUXONICE_LOC/user_interface/enabled")"
-	if [ -x "$toi_ui" ] && [ "$toi_ui_en" = 1 ] && \
-	    ! state_exists console; then
+	local x y
+	read x y  < $TUXONICE_LOC/user_interface/program
+	read y < $TUXONICE_LOC/user_interface/enabled
+	if [ -x "$x" -a "$y" = 1 ] && ! state_exists console; then
 	    fgconsole |savestate console
 	    chvt 63
 	fi

Reply via email to