live: updated 40-autologin to support kdm4

Was long overdue already but let's leave that in 2012. :)
This commit is contained in:
Michael Shigorin 2012-12-31 21:35:05 +02:00
parent a1c0e82e31
commit d94232fb87

View File

@ -48,15 +48,20 @@ if [ -f "$GDM_CONF" ]; then
add_nopasswdlogin_group gdm ||:
fi
## kdm3 autologin
# TODO: iterate over kdm{,4} if feasible
KDMRC=/etc/X11/kdm/kdmrc
if [ -f "$KDMRC" ]; then
autologin_kdm() {
sed -i \
-e '/AutoLoginEnable/ s,^.*$,AutoLoginEnable=true,' \
-e '/AutoLoginUser/ s,^.*$,AutoLoginUser='$USER',' \
"$KDMRC"
fi
"$1"
}
## kdm3 autologin
KDMRC=/etc/X11/kdm/kdmrc
if [ -f "$KDMRC" ]; then autologin_kdm "$KDMRC"; fi
## kdm4 autologin
KDMRC=/etc/X11/kdm4/kdmrc
if [ -f "$KDMRC" ]; then autologin_kdm "$KDMRC"; fi
## nodm autologin (the last since the most intrusive)
# FIXME nodm and xinitrc should be modified (also in p6)