From 46ed2c7d2c0286755b3e79d3449f8b882275d2c0 Mon Sep 17 00:00:00 2001
From: Andreas Loibl <andreas@andreas-loibl.de>
Date: Thu, 14 Feb 2013 11:21:11 +0100
Subject: fixed LXDE auto login

---
 backend/modules/install_main | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/backend/modules/install_main b/backend/modules/install_main
index 0a9f1fa..18e1d7a 100644
--- a/backend/modules/install_main
+++ b/backend/modules/install_main
@@ -310,8 +310,9 @@ function copy_etc_to_target()
     
     # LightDM: auto login
     if [ -e $TARGET/etc/lightdm/lightdm.conf ]; then
-        sed -i -r -e "s|^#.*autologin-user=.*\$|autologin-user=$cfg_username|" \
-            -e "s|^#.*autologin-user-timeout=.*\$|autologin-user-timeout=0|" \
+		[ "$cfg_autologin" = "on" ] && autologin="" || autologin="#"
+        sed -i -r -e "s|^#.*autologin-user=.*\$|${autologin}autologin-user=$cfg_username|" \
+            -e "s|^#.*autologin-user-timeout=.*\$|${autologin}autologin-user-timeout=0|" \
         $TARGET/etc/lightdm/lightdm.conf
     fi
 
-- 
cgit v1.0