Merge pull request #24054 from keszybz/initrd-no-reload
Don't do daemon-reload in the initrd
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user