Fix GDM auto-login for all GNOME-based spins

Using >> means we have a custom.conf file that looks like this:

[daemon]
...
[daemon]
AutomaticLoginEnable=True
AutomaticLogin=liveuser

Which is the first reason why it's failing. Change the cat append to replace as
the other sections are optional.

Additionally, the livesys legacy service is not completing before gdm is being
started, which means the config file is being read before it has been altered.

This can be fixed by adding a LSB-style "X-Start-Before: display-manager" in the
header of livesys.
This commit is contained in:
Richard Hughes 2013-02-13 15:37:36 +00:00 committed by Matthias Clasen
parent 85123ce365
commit 254dfaeee6
5 changed files with 9 additions and 3 deletions

View File

@ -63,6 +63,9 @@ cat > /etc/rc.d/init.d/livesys << EOF
# #
# chkconfig: 345 00 99 # chkconfig: 345 00 99
# description: Init script for live image. # description: Init script for live image.
### BEGIN INIT INFO
# X-Start-Before: display-manager
### END INIT INFO
. /etc/init.d/functions . /etc/init.d/functions

View File

@ -55,7 +55,7 @@ fi
glib-compile-schemas /usr/share/glib-2.0/schemas glib-compile-schemas /usr/share/glib-2.0/schemas
# set up auto-login # set up auto-login
cat >> /etc/gdm/custom.conf << FOE cat > /etc/gdm/custom.conf << FOE
[daemon] [daemon]
AutomaticLoginEnable=True AutomaticLoginEnable=True
AutomaticLogin=liveuser AutomaticLogin=liveuser

View File

@ -107,6 +107,9 @@ cat > /etc/rc.d/init.d/livesys << EOF
# #
# chkconfig: 345 00 99 # chkconfig: 345 00 99
# description: Init script for live image. # description: Init script for live image.
### BEGIN INIT INFO
# X-Start-Before: display-manager
### END INIT INFO
. /etc/init.d/functions . /etc/init.d/functions

View File

@ -67,7 +67,7 @@ vu.lux.olpc.Speak
EOF EOF
# set up auto-login # set up auto-login
cat >> /etc/gdm/custom.conf << EOF cat > /etc/gdm/custom.conf << EOF
[daemon] [daemon]
AutomaticLoginEnable=True AutomaticLoginEnable=True
AutomaticLogin=liveuser AutomaticLogin=liveuser

View File

@ -127,7 +127,7 @@ fi
glib-compile-schemas /usr/share/glib-2.0/schemas glib-compile-schemas /usr/share/glib-2.0/schemas
# set up auto-login # set up auto-login
cat >> /etc/gdm/custom.conf << FOE cat > /etc/gdm/custom.conf << FOE
[daemon] [daemon]
AutomaticLoginEnable=True AutomaticLoginEnable=True
AutomaticLogin=liveuser AutomaticLogin=liveuser