Simplify _graphical_wait_login by dropping a huge conditional

If USER_LOGIN is false we can just return; when we reach the
login screen. We don't need a huge conditional when we don't do
anything *after* it, in the false case.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2018-09-06 15:01:08 -07:00
parent 26c4171e5c
commit 64c5070b06

View File

@ -27,10 +27,11 @@ sub run {
}
# Wait for the login screen
boot_to_login_screen(timeout => $wait_time);
# if USER_LOGIN is set to string 'false', we're done here
return if (get_var("USER_LOGIN") eq "false");
# GDM 3.24.1 dumps a cursor in the middle of the screen here...
mouse_hide;
# do user login unless USER_LOGIN is set to string 'false'
unless (get_var("USER_LOGIN") eq "false") {
if (get_var("DESKTOP") eq 'gnome') {
# we have to hit enter to get the password dialog
send_key "ret";
@ -107,7 +108,6 @@ sub run {
# KDE can take ages to start up
check_desktop_clean(tries=>40);
}
}
sub test_flags {
return { fatal => 1, milestone => 1 };