service: warn if a dbus name is specified but the service type is not dbus

This commit is contained in:
Lennart Poettering
2012-05-03 14:42:49 +02:00
parent 682fff7371
commit 7e2668c6fd
2 changed files with 7 additions and 0 deletions
+3
View 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;