summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
Diffstat (limited to 'pm')
-rw-r--r--pm/pm-functions.in4
-rwxr-xr-xpm/sleep.d/00clear9
2 files changed, 8 insertions, 5 deletions
diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index c14e534..2c97848 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -34,7 +34,7 @@ NX=253
DX=252
PM_FUNCTIONS="$PM_UTILS_LIBDIR/functions"
# Use c sort order
-export LC_COLLATE=C
+LC_COLLATE=C
[ -f "${PM_UTILS_LIBDIR}"/defaults ] && . "${PM_UTILS_LIBDIR}"/defaults
@@ -92,8 +92,6 @@ take_suspend_lock()
remove_suspend_lock()
{
- local curr_vt=$(fgconsole)
- [ "$curr_vt" = "$VT" ] || chvt "$VT"
rm -rf "${STORAGEDIR}"
release_lock "pm-utils.lock"
}
diff --git a/pm/sleep.d/00clear b/pm/sleep.d/00clear
index a0c5081..217d8db 100755
--- a/pm/sleep.d/00clear
+++ b/pm/sleep.d/00clear
@@ -4,10 +4,15 @@
case "$1" in
hibernate|suspend*)
- TERM=linux openvt -w -s -f -c 63 -- clear >/dev/null 2>&1
+ fgconsole |savestate console
chvt 63
+ TERM=linux clear
+ ;;
+ thaw|resume)
+ state_exists console || exit 1
+ chvt $(restorestate console)
+ deallocvt 63
;;
- thaw|resume) chvt 1 ;;
*)
;;
esac