1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-11 20:58:27 +03:00

ask-password-agent: send READY=1 when we established inotify watch

This commit is contained in:
Lennart Poettering 2024-11-06 23:38:17 +01:00
parent fbae5e64c4
commit c4859de8dd
3 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include "build.h"
#include "conf-parser.h"
#include "constants.h"
#include "daemon-util.h"
#include "devnum-util.h"
#include "dirent-util.h"
#include "exit-status.h"
@ -393,6 +394,9 @@ static int process_and_watch_password_files(bool watch) {
pollfd[FD_INOTIFY] = (struct pollfd) { .fd = notify, .events = POLLIN };
}
_unused_ _cleanup_(notify_on_cleanup) const char *notify_stop =
notify_start(NOTIFY_READY, NOTIFY_STOPPING);
for (;;) {
usec_t timeout = USEC_INFINITY;

View File

@ -22,4 +22,5 @@ Before=shutdown.target initrd-switch-root.target
[Service]
ExecStart=systemd-tty-ask-password-agent --watch --console
Type=notify
SystemCallArchitectures=native

View File

@ -15,4 +15,5 @@ After=systemd-user-sessions.service
[Service]
ExecStartPre=-systemctl stop systemd-ask-password-console.path systemd-ask-password-console.service systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service
ExecStart=systemd-tty-ask-password-agent --wall
Type=notify
SystemCallArchitectures=native