]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/service.c
service: warn if a dbus name is specified but the service type is not dbus
[thirdparty/systemd.git] / src / core / service.c
index 4358a948de92c3fe409f232cddde0c55a42b8539..a99e1c3770f6212e363ca1c1a5d9251f4d789324 100644 (file)
@@ -1135,6 +1135,9 @@ static int service_verify(Service *s) {
                 return -EINVAL;
         }
 
+        if (s->bus_name && s->type != SERVICE_DBUS)
+                log_warning("%s has a D-Bus service name specified, but is not of type dbus. Ignoring.", UNIT(s)->id);
+
         if (s->exec_context.pam_name && s->exec_context.kill_mode != KILL_CONTROL_GROUP) {
                 log_error("%s has PAM enabled. Kill mode must be set to 'control-group'. Refusing.", UNIT(s)->id);
                 return -EINVAL;