1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

bus: skip unit file generation for systemd itself

This commit is contained in:
Lennart Poettering 2013-12-03 01:24:39 +01:00
parent 1b16c75cd2
commit 4c3a127cb6

View File

@ -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;