Index: systemd-210/src/core/manager.c =================================================================== --- systemd-210.orig/src/core/manager.c +++ systemd-210/src/core/manager.c @@ -152,6 +152,29 @@ void manager_flip_auto_status(Manager *m } } +static int check_for_password_prompt(void) { + DIR *d; + struct dirent *de; + + if (!(d = opendir("/run/systemd/ask-password"))) { + + if (errno == ENOENT) + return 1; + log_error("opendir(/run/systemd/ask-password): %m"); + + return -errno; + } + + while ((de = readdir(d))) { + if (startswith(de->d_name, "ask.")) { + closedir(d); + return 0; + } + } + closedir(d); + return 1; +} + static void manager_print_jobs_in_progress(Manager *m) { static int is_ansi_console = -1; _cleanup_free_ char *job_of_n = NULL; @@ -195,6 +218,10 @@ static void manager_print_jobs_in_progre m->jobs_in_progress_iteration++; + //don't overwrite the crypt password prompt with job status messages + if (check_for_password_prompt() == 0) + return; + if (m->n_running_jobs > 1) if (asprintf(&job_of_n, "(%u of %u) ", counter, m->n_running_jobs) < 0) job_of_n = NULL;