5 # initramfs-tools header
21 # live-initramfs header
23 . /scripts/live-functions
25 log_begin_msg "Setting up automatic login..."
27 # live-initramfs script
29 if [ -z "${NOXAUTOLOGIN}" ]
32 if chroot /root [ -f /etc/gdm/gdm-cdd.conf ]; then
33 GDMCONF=/etc/gdm/gdm-cdd.conf
35 GDMCONF=/etc/gdm/gdm.conf
38 if chroot /root [ -f ${GDMCONF} ]; then
39 if [ "${BUILD_SYSTEM}" == "Debian" ]; then
40 # true hack ! -- nohar
41 chroot /root cp /usr/share/gdm/defaults.conf /etc/gdm/gdm.conf
44 # Configure GDM autologin
46 -e "s/^AutomaticLoginEnable=.*\$/AutomaticLoginEnable=true/" \
47 -e "s/^AutomaticLogin=.*\$/AutomaticLogin=$USERNAME/" \
48 -e "s/^TimedLoginEnable=.*\$/TimedLoginEnable=true/" \
49 -e "s/^TimedLogin=.*\$/TimedLogin=$USERNAME/" \
50 -e "s/^TimedLoginDelay=.*\$/TimedLoginDelay=10/" \
54 if [ -f /root/etc/kde3/kdm/kdmrc ]; then
55 # Configure KDM autologin
57 -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
58 -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \
59 -e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \
60 /root/etc/kde3/kdm/kdmrc
65 if chroot /root /usr/bin/which kpersonalizer >/dev/null; then
66 # Disable first-login wizard for KDE
67 if [ ! -f /root/etc/kde3/kpersonalizerrc ]; then
68 cat > /root/etc/kde3/kpersonalizerrc <<EOF
73 echo "I'm not smart enough to disable kpersonalizer startup" >&2
74 echo "Because kpersonalizerrc already exists" >&2