From 8bac4e8ca4e06a210b263291ac585b913d0151a1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 26 Mar 2009 14:11:56 +0100 Subject: [PATCH] Correcting kdm live-autologin handling to not always append entries forever when using persistency. --- scripts/live-bottom/14locales | 5 ++++- scripts/live-bottom/15autologin | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 -- 2.1.4