SHA256
1
0
forked from pool/systemd
systemd/keep-crypt-password-prompt.patch
Stephan Kulow 78482cb567 Accepting request 232729 from Base:System
- Port upstream patch
  0001-sd-rtnl-message-append-fix-uninitialized-memory.patch
  back to 210
- Add patch keep-crypt-password-prompt.patch from Thomas Blume
  to fix bnc#875502 - fails to boot when swap space is encrypted
- Port upstream patch set for net_id back in patch
  upstream-net_id-changes.patch

- Port upstream patch
  0001-sd-rtnl-message-append-fix-uninitialized-memory.patch
  back to 210
- Add patch keep-crypt-password-prompt.patch from Thomas Blume
  to fix bnc#875502 - fails to boot when swap space is encrypted
- Port upstream patch set for net_id back in patch
  upstream-net_id-changes.patch

OBS-URL: https://build.opensuse.org/request/show/232729
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=184
2014-05-06 11:39:41 +00:00

44 lines
1.2 KiB
Diff

--- systemd-210/src/core/manager.c 2014-05-05 11:46:17.700483956 +0200
+++ systemd-210/src/core/manager.c 2014-05-05 13:29:13.296503646 +0200
@@ -152,6 +152,29 @@
}
}
+static int check_for_password_prompt(void) {
+ DIR *d;
+ struct dirent *de;
+
+ if (!(d = opendir("/run/systemd/ask-password"))) {
+ log_error("opendir(): %m");
+
+ if (errno == ENOENT)
+ return 1;
+
+ 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 +217,10 @@
m->jobs_in_progress_iteration++;
+ //don't overwrite the crypt password prompt with job status messages
+ if (check_for_password_prompt() == 0);
+ return 0;
+
if (m->n_running_jobs > 1)
if (asprintf(&job_of_n, "(%u of %u) ", counter, m->n_running_jobs) < 0)
job_of_n = NULL;