]> err.no Git - systemd/commitdiff
manager: when running in test mode, do not write generated unit files to /run/systemd...
authorLennart Poettering <lennart@poettering.net>
Tue, 19 Apr 2011 20:17:54 +0000 (22:17 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 19 Apr 2011 20:17:54 +0000 (22:17 +0200)
src/manager.c

index 495c8e6ba359b83c76fc889ade2705e3ded74dbf..b59339b178c7187834fa7614c7c22f21ef32707a 100644 (file)
@@ -2937,7 +2937,7 @@ void manager_run_generators(Manager *m) {
                 const char *p;
                 char user_path[] = "/tmp/systemd-generator-XXXXXX";
 
-                if (m->running_as == MANAGER_SYSTEM) {
+                if (m->running_as == MANAGER_SYSTEM && getpid() == 1) {
                         p = "/run/systemd/generator";
 
                         if (mkdir_p(p, 0755) < 0) {