mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
core: do not try to create /run/systemd/transient in test mode
This prevented systemd-analyze from unprivileged operation on older systemd installations, which should be possible. Also, we shouldn't touch the file system in test mode even if we can.
This commit is contained in:
committed by
Martin Pitt
parent
d941ea22e3
commit
a63ee40751
@@ -1236,9 +1236,11 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
|
||||
return r;
|
||||
|
||||
/* Make sure the transient directory always exists, so that it remains in the search path */
|
||||
r = mkdir_p_label(m->lookup_paths.transient, 0755);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (!m->test_run) {
|
||||
r = mkdir_p_label(m->lookup_paths.transient, 0755);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
dual_timestamp_get(&m->generators_start_timestamp);
|
||||
r = manager_run_generators(m);
|
||||
|
||||
Reference in New Issue
Block a user