X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F15autologin;h=12c937d2e9e1a96e37812759de49bb31ae49d42e;hb=7111ab7c3b1220384a8f576e170ba3910110ad97;hp=bee8d7021fbbcb18abff0897b3790be875bfc1d6;hpb=f32a0232042e7579d78c1646d93fd68eec62aaa2;p=live-boot-grml.git diff --git a/scripts/live-bottom/15autologin b/scripts/live-bottom/15autologin index bee8d70..12c937d 100755 --- a/scripts/live-bottom/15autologin +++ b/scripts/live-bottom/15autologin @@ -66,15 +66,12 @@ TimedLoginDelay=10" # Prevent from updating if parameters already present (persistent usb # key) - if ! $(grep -qs 'AutomaticLoginEnable' $GDMCustomFile) + if ! $(grep -qs '\[daemon\]' $GDMCustomFile) then - if $(grep -qs '\[daemon\]' $GDMCustomFile) - then - sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile - else - echo "[daemon]\n$AutologinParameters" >> $GDMCustomFile - fi + echo '[daemon]' >> $GDMCustomFile fi + + sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile fi if [ -d /root/etc/default/kdm.d/ ] @@ -106,4 +103,12 @@ then /root/etc/kde4/kdm/kdmrc fi +if [ -f /root/etc/lxdm/lxdm.conf ] +then + # Configure LXDM autologin + sed -i -r -e "s/^# autologin=dgod/autologin=$USERNAME/" \ + -e "s/^# session/session/" \ + /root/etc/lxdm/lxdm.conf +fi + log_end_msg