From a4b85df4fa61050af3fcb7e334875dde8fca32d2 Mon Sep 17 00:00:00 2001
From: Andreas Loibl <andreas@andreas-loibl.de>
Date: Wed, 13 Feb 2013 22:52:55 +0100
Subject: added LightDM autologin

---
 backend/modules/install_main | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/backend/modules/install_main b/backend/modules/install_main
index f8c930f..aad3c56 100644
--- a/backend/modules/install_main
+++ b/backend/modules/install_main
@@ -308,6 +308,13 @@ function copy_etc_to_target()
 		[ "$cfg_autologin" = "on" ] && autologin="true" || autologin="false"
 		perl -pi -e "s|^[#\s]*(AutomaticLoginEnable)\s*=.*|\1=$autologin|"  $daemoncfg
 	fi
+    
+    # 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|" \
+        $TARGET/etc/lightdm/lightdm.conf
+    fi
 
 	# Crypto
 	cp -a /etc/crypttab $TARGET/etc/crypttab
-- 
cgit v1.0