angstrom: Add (hack) recipe to enable autologin (timed) for gdm
authorRoger Monk <r-monk@ti.com>
Fri, 6 Aug 2010 13:56:32 +0000 (14:56 +0100)
committerKoen Kooi <k-kooi@ti.com>
Mon, 30 Aug 2010 07:38:35 +0000 (09:38 +0200)
   * Append autologin to default custom.conf
   * Longer term need better replacement/conf mechanism

Signed-off-by: Roger Monk <r-monk@ti.com>
Signed-off-by: Koen Kooi <k-kooi@ti.com>
recipes/angstrom/angstrom-gdm-autologin-hack.bb [new file with mode: 0644]

diff --git a/recipes/angstrom/angstrom-gdm-autologin-hack.bb b/recipes/angstrom/angstrom-gdm-autologin-hack.bb
new file mode 100644 (file)
index 0000000..5c5d7e8
--- /dev/null
@@ -0,0 +1,23 @@
+DESCRIPTION = "Append Autologin to GDM config (custom.conf)"
+
+PACKAGE_ARCH = "all"
+ALLOW_EMPTY_${PN} = "1"
+
+pkg_postinst_${PN}() {
+#!/bin/sh
+grep "TimedLogin" $D/etc/gdm/custom.conf
+if [ $? -eq 0 ]; then
+   echo "NOTE:: custom.conf already has 'TimedLogin' configured - not patching
+else
+    cat >> $D/etc/gdm/custom.conf <<EOF
+
+[daemon]
+TimedLoginEnable=true
+TimedLogin=root
+TimedLoginDelay=10
+
+EOF
+fi
+}
+
+RDEPENDS_${PN} = "gdm"