chiark / gitweb /
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 495c8e6..b59339b 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) {