Fix default user handling.
[live-boot-grml.git] / scripts / live-bottom / 15autologin
index bb9902e..28a3141 100755 (executable)
@@ -20,13 +20,13 @@ esac
 
 # live-initramfs header
 
-if [ -n "${NOXAUTOLOGIN}" ]
+. /scripts/live-functions
+
+if [ -n "${NOXAUTOLOGIN}" ] || [ -z "${USERNAME}" ]
 then
        exit 0
 fi
 
-. /scripts/live-functions
-
 log_begin_msg "Setting up automatic login"
 
 # live-initramfs script