return 1;
}
-static int sysv_chkconfig_order(Service *s) {
+static int sysv_fix_order(Service *s) {
Meta *other;
int r;
assert(s);
assert(name);
+ /* For SysV services we strip the boot. or .sh
+ * prefixes/suffixes. */
+ if (startswith(name, "boot.") ||
+ endswith(name, ".sh.service"))
+ return -ENOENT;
+
STRV_FOREACH(p, UNIT(s)->meta.manager->sysvinit_path) {
char *path;
int r;
r = service_load_sysv_path(s, path);
if (r >= 0 && UNIT(s)->meta.load_state == UNIT_STUB) {
- /* Try Debian style .sh source'able init scripts */
+ /* Try Debian style xxx.sh source'able init scripts */
strcat(path, ".sh");
r = service_load_sysv_path(s, path);
}
free(path);
if (r >= 0 && UNIT(s)->meta.load_state == UNIT_STUB) {
- /* Try Suse style boot.xxxx init scripts */
+ /* Try Suse style boot.xxx init scripts */
if (asprintf(&path, "%s/boot.%s", *p, name) < 0)
return -ENOMEM;
if ((r = unit_add_default_cgroup(u)) < 0)
return r;
- if ((r = sysv_chkconfig_order(s)) < 0)
+ if ((r = sysv_fix_order(s)) < 0)
return r;
if (s->bus_name) {
/* Make sure we don't enter a busy loop of some kind. */
if (!ratelimit_test(&s->ratelimit)) {
log_warning("%s start request repeated too quickly, refusing to start.", u->meta.id);
- return -EAGAIN;
+ return -ECANCELED;
}
s->failure = false;