diff --git a/src/lib/install.sh b/src/lib/install.sh index c5ace01..e843122 100644 --- a/src/lib/install.sh +++ b/src/lib/install.sh @@ -252,7 +252,9 @@ EOF # add the shell login file to the edit list after install EDIT_FILES[11]+=" /home/$NEWUSER/$loginrc" - cat >> $MNT/home/$NEWUSER/$loginrc << EOF + if [[ $AUTOLOGIN == true ]]; then + sed -i "s/root/${NEWUSER}/g" $SERVICE/autologin.conf + cat >> $MNT/home/$NEWUSER/$loginrc << EOF # ~/$loginrc # sourced by $(basename $MYSHELL) when used as a login shell @@ -261,16 +263,16 @@ if [ -z "\$DISPLAY" ] && [ \$XDG_VTNR -eq 1 ]; then exec startx -- vt1 >/dev/null 2>&1 fi EOF - if [[ $AUTOLOGIN == true ]]; then - sed -i "s/root/${NEWUSER}/g" $SERVICE/autologin.conf else rm -rf $SERVICE + rm -rf $MNT/home/$NEWUSER/.{xinitrc,profile,zprofile,bash_profile} fi } setup_lightdm() { rm -rf $SERVICE + rm -rf $MNT/home/$NEWUSER/.{xinitrc,profile,zprofile,bash_profile} chrun 'systemctl set-default graphical.target && systemctl enable lightdm.service' cat > $MNT/etc/lightdm/lightdm-gtk-greeter.conf << EOF # LightDM GTK+ Configuration