From d267cca78f6419b3248d1647fc0bd0a1c5e4f203 Mon Sep 17 00:00:00 2001
From: Andreas Loibl <andreas@andreas-loibl.de>
Date: Sun, 5 Sep 2010 12:33:34 +0200
Subject: added hack to prevent kdm's "abort active sessions" prompt

---
 config/chroot_local-includes/lib/live/config/901-hotfixes | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/config/chroot_local-includes/lib/live/config/901-hotfixes b/config/chroot_local-includes/lib/live/config/901-hotfixes
index 9d8214a..5a28eb4 100755
--- a/config/chroot_local-includes/lib/live/config/901-hotfixes
+++ b/config/chroot_local-includes/lib/live/config/901-hotfixes
@@ -5,3 +5,17 @@ if [ -n "${LIVE_TIMEZONE}" ]; then
 	echo "${LIVE_TIMEZONE}" > /etc/timezone
 fi
 
+# dirty hack to prevent kdm's "abort active sessions" prompt on live system
+sudo -u "${LIVE_USERNAME}" sh -c "mkdir -p /home/${LIVE_USERNAME}/.kde/shutdown; cat > /home/${LIVE_USERNAME}/.kde/shutdown/kdm-force-shutdown-hack" << EOF
+#!/bin/sh
+# dirty hack to prevent kdm's "abort active sessions" prompt on live system
+
+. /etc/default/distro
+[ "$FLL_DISTRO_MODE" = "live ] || exit # are we live?
+
+# "destroy" utmp, so kdm won't recognize the running logins on the other TTYs
+sudo perl -pi -e 's/tty/xty/g' /var/run/utmp
+
+EOF
+chmod +x /home/${LIVE_USERNAME}/.kde/shutdown/kdm-force-shutdown-hack
+
-- 
cgit v1.0