1
0
mirror of https://github.com/systemd/systemd synced 2024-07-05 17:39:42 +00:00

logind: implement Type=notify-reload protocol properly

So close already. Let's add the two missing notifications too.

Fixes: #18484
This commit is contained in:
Lennart Poettering 2023-01-02 17:35:23 +01:00
parent f84331539d
commit 5d71e463f4
2 changed files with 7 additions and 0 deletions

View File

@ -1020,6 +1020,11 @@ static int manager_dispatch_reload_signal(sd_event_source *s, const struct signa
Manager *m = userdata;
int r;
(void) sd_notifyf(/* unset= */ false,
"RELOADING=1\n"
"STATUS=Reloading configuration...\n"
"MONOTONIC_USEC=" USEC_FMT, now(CLOCK_MONOTONIC));
manager_reset_config(m);
r = manager_parse_config_file(m);
if (r < 0)
@ -1027,6 +1032,7 @@ static int manager_dispatch_reload_signal(sd_event_source *s, const struct signa
else
log_info("Config file reloaded.");
(void) sd_notify(/* unset= */ false, NOTIFY_READY);
return 0;
}

View File

@ -58,6 +58,7 @@ StateDirectory=systemd/linger
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
Type=notify-reload
{{SERVICE_WATCHDOG}}
# Increase the default a bit in order to allow many simultaneous logins since