#ifdef TARGET_FEDORA
/* Fedora extensions, lacking the $ prefix */
"MTA", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
- "smtpdaemon", SPECIAL_MAIL_TRANSFER_AGENT_TARGET
+ "smtpdaemon", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
+ "httpd", SPECIAL_HTTP_DAEMON_TARGET,
#endif
};
}
if (*name == '$')
- return 0;
+ r = unit_name_build(name+1, NULL, ".target");
+ else
+ r = sysv_translate_name(name);
- if (!(r = sysv_translate_name(name)))
+ if (!r)
return -ENOMEM;
finish:
/* If both units have modern headers we don't care
* about the priorities */
- if ((!s->sysv_path || s->sysv_has_lsb) &&
- (!t->sysv_path || t->sysv_has_lsb))
+ if ((s->meta.fragment_path || s->sysv_has_lsb) &&
+ (t->meta.fragment_path || t->sysv_has_lsb))
continue;
special_s = s->sysv_runlevels && !chars_intersect(RUNLEVELS_UP, s->sysv_runlevels);
return 0;
}
-static int service_add_bus_name(Service *s) {
- char *n;
- int r;
-
- assert(s);
- assert(s->bus_name);
-
- if (asprintf(&n, "dbus-%s.service", s->bus_name) < 0)
- return 0;
-
- r = unit_merge_by_name(UNIT(s), n);
- free(n);
-
- return r;
-}
-
static int service_verify(Service *s) {
assert(s);
if ((r = sysv_fix_order(s)) < 0)
return r;
- if (s->bus_name) {
- if ((r = service_add_bus_name(s)) < 0)
- return r;
-
+ if (s->bus_name)
if ((r = unit_watch_bus_name(u, s->bus_name)) < 0)
return r;
- }
if (s->type == SERVICE_NOTIFY && s->notify_access == NOTIFY_NONE)
s->notify_access = NOTIFY_MAIN;
assert(s);
assert(pid >= 0);
- if (s->sysv_path)
+ if (!s->meta.fragment_path)
success = is_clean_exit_lsb(code, status);
else
success = is_clean_exit(code, status);