summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfig/chroot_local-includes/lib/live/config/901-hotfixes14
1 files changed, 14 insertions, 0 deletions
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
+