{ "rc5.d", SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP },
{ "rc6.d", SPECIAL_RUNLEVEL6_TARGET, RUNLEVEL_DOWN },
- /* SuSE style boot.d */
+ /* SUSE style boot.d */
{ "boot.d", SPECIAL_BASIC_TARGET, RUNLEVEL_BASIC },
/* Debian style rcS.d */
s->valid_no_process = true;
s->kill_mode = KILL_PROCESS_GROUP;
- /* For SysV services log output should go to the console */
- s->exec_context.std_input = EXEC_INPUT_NULL;
- s->exec_context.std_output = EXEC_OUTPUT_TTY;
- s->exec_context.std_error = EXEC_OUTPUT_TTY;
-
u->meta.load_state = UNIT_LOADED;
r = 0;
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;
/* 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;
+ service_enter_dead(s, false, true);
+ return -ECANCELED;
}
s->failure = false;