From: Daniel Baumann Date: Thu, 26 Mar 2009 13:11:56 +0000 (+0100) Subject: Correcting kdm live-autologin handling to not always append entries forever when... X-Git-Tag: debian/1.157.2-1~9 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=8bac4e8ca4e06a210b263291ac585b913d0151a1;p=live-boot-grml.git Correcting kdm live-autologin handling to not always append entries forever when using persistency. --- diff --git a/scripts/live-bottom/14locales b/scripts/live-bottom/14locales index 6348338..58f7e82 100755 --- a/scripts/live-bottom/14locales +++ b/scripts/live-bottom/14locales @@ -104,7 +104,10 @@ then if [ -d /root/etc/default/kdm.d/ ] then - printf 'LANGUAGE=%s\n' "${LANG}" >> /root/etc/default/kdm.d/live-autologin + if ! grep -qs "^LANGUAGE" "${LANG}" + then + printf 'LANGUAGE=%s\n' "${LANG}" >> /root/etc/default/kdm.d/live-autologin + fi elif [ -f /root/etc/kde3/kdm/kdmrc ] then sed -i -r -e "s/#Language=.*/Language=${language}/" \ diff --git a/scripts/live-bottom/15autologin b/scripts/live-bottom/15autologin index 7fb2b13..38c3a8f 100755 --- a/scripts/live-bottom/15autologin +++ b/scripts/live-bottom/15autologin @@ -59,6 +59,8 @@ fi if [ -d /root/etc/default/kdm.d/ ] then + if ! grep -qs "^AUTOLOGIN" /root/etc/default/kdm.d/live-autologin + then cat >> /root/etc/default/kdm.d/live-autologin << EOF AUTOLOGINUSER=${USERNAME} @@ -66,6 +68,8 @@ AUTOLOGINAGAIN=true AUTOLOGINDELAY=0 EOF + fi + elif [ -f /root/etc/kde3/kdm/kdmrc ] then # Configure KDM autologin