summaryrefslogtreecommitdiff
path: root/src/dbus1-generator/dbus1-generator.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-03 01:24:39 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-03 01:24:39 +0100
commit4c3a127cb631cf5efe8a6aab3fb2884e9044ef2d (patch)
tree2d069eaaa3fcb2398236aa6605e4c220165e111c /src/dbus1-generator/dbus1-generator.c
parent1b16c75cd2da6741824e9843135f55e3b5d23d9d (diff)
bus: skip unit file generation for systemd itself
Diffstat (limited to 'src/dbus1-generator/dbus1-generator.c')
-rw-r--r--src/dbus1-generator/dbus1-generator.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dbus1-generator/dbus1-generator.c b/src/dbus1-generator/dbus1-generator.c
index 93c6392f83..31ec56e7ec 100644
--- a/src/dbus1-generator/dbus1-generator.c
+++ b/src/dbus1-generator/dbus1-generator.c
@@ -183,6 +183,11 @@ static int add_dbus(const char *path, const char *fname, const char *type) {
return 0;
}
+ if (streq(name, "org.freedesktop.systemd1")) {
+ log_debug("Skipping %s, identified as systemd.", p);
+ return 0;
+ }
+
if (service) {
if (!unit_name_is_valid(service, false)) {
log_warning("Unit name %s is not valid, ignoring.", service);
@@ -193,7 +198,7 @@ static int add_dbus(const char *path, const char *fname, const char *type) {
return 0;
}
} else {
- if (!exec) {
+ if (streq(exec, "/bin/false") || !exec) {
log_warning("Neither service name nor binary path specified, ignoring %s.", p);
return 0;
}
@@ -219,7 +224,7 @@ static int parse_dbus_fragments(void) {
type = "session";
} else if (r == -ENOENT) {
p = "/usr/share/dbus-1/system-services";
- type = "systemd";
+ type = "system";
} else if (r < 0) {
log_error("Failed to determine whether we are running as user or system instance: %s", strerror(-r));
return r;