Merge pull request #24054 from keszybz/initrd-no-reload

Don't do daemon-reload in the initrd
This commit is contained in:
Frantisek Sumsal
2022-08-18 13:15:14 +00:00
committed by GitHub
15 changed files with 277 additions and 157 deletions
+2 -6
View File
@@ -37,12 +37,8 @@ int daemon_reload(enum action action, bool graceful) {
if (r < 0)
return bus_log_create_error(r);
/* Note we use an extra-long timeout here. This is because a reload or reexec means generators are
* rerun which are timed out after DEFAULT_TIMEOUT_USEC. Let's use twice that time here, so that the
* generators can have their timeout, and for everything else there's the same time budget in
* place. */
r = sd_bus_call(bus, m, DEFAULT_TIMEOUT_USEC * 2, &error, NULL);
/* Reloading the daemon may take long, hence set a longer timeout here */
r = sd_bus_call(bus, m, DAEMON_RELOAD_TIMEOUT_SEC, &error, NULL);
/* On reexecution, we expect a disconnect, not a reply */
if (IN_SET(r, -ETIMEDOUT, -ECONNRESET) && action == ACTION_REEXEC)