Switch from vol_id to blkid if using udev >=146-1 (Closes: #555529).
[live-boot-grml.git] / scripts / live-bottom / 15autologin
index 28a3141..38c3a8f 100755 (executable)
@@ -20,13 +20,15 @@ esac
 
 # live-initramfs header
 
-. /scripts/live-functions
+. /live.vars
 
 if [ -n "${NOXAUTOLOGIN}" ] || [ -z "${USERNAME}" ]
 then
        exit 0
 fi
 
+. /scripts/live-functions
+
 log_begin_msg "Setting up automatic login"
 
 # live-initramfs script
@@ -57,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}
@@ -64,6 +68,8 @@ AUTOLOGINAGAIN=true
 AUTOLOGINDELAY=0
 EOF
 
+       fi
+
 elif [ -f /root/etc/kde3/kdm/kdmrc ]
 then
        # Configure KDM autologin