diff options
-rw-r--r-- | backend/modules/install_main | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/modules/install_main b/backend/modules/install_main index 0a9f1fa..18e1d7a 100644 --- a/backend/modules/install_main +++ b/backend/modules/install_main @@ -310,8 +310,9 @@ function copy_etc_to_target() # LightDM: auto login if [ -e $TARGET/etc/lightdm/lightdm.conf ]; then - sed -i -r -e "s|^#.*autologin-user=.*\$|autologin-user=$cfg_username|" \ - -e "s|^#.*autologin-user-timeout=.*\$|autologin-user-timeout=0|" \ + [ "$cfg_autologin" = "on" ] && autologin="" || autologin="#" + sed -i -r -e "s|^#.*autologin-user=.*\$|${autologin}autologin-user=$cfg_username|" \ + -e "s|^#.*autologin-user-timeout=.*\$|${autologin}autologin-user-timeout=0|" \ $TARGET/etc/lightdm/lightdm.conf fi |