conf.set_quoted(name, path)
endforeach
-conf.set_quoted('TELINIT', get_option('telinit-path'))
-
if run_command(ln, '--relative', '--help', check : false).returncode() != 0
error('ln does not support --relative (added in coreutils 8.16)')
endif
description : 'the directory where the SysV init scripts are located')
option('sysvrcnd-path', type : 'string', value : '/etc/rc.d',
description : 'the base directory for SysV rcN.d directories')
-option('telinit-path', type : 'string', value : '/lib/sysvinit/telinit',
- description : 'path to telinit')
option('rc-local', type : 'string',
value : '/etc/rc.local')
option('initrd', type : 'boolean',
return 0;
}
-
-int exec_telinit(char *argv[]) {
- (void) rlimit_nofile_safe();
- (void) execv(TELINIT, argv);
-
- return log_error_errno(SYNTHETIC_ERRNO(EIO),
- "Couldn't find an alternative telinit implementation to spawn.");
-}
int telinit_parse_argv(int argc, char *argv[]);
int start_with_fallback(void);
int reload_with_fallback(void);
-int exec_telinit(char *argv[]);
*
* Also see redirect_telinit() in src/core/main.c. */
- if (sd_booted() > 0) {
- arg_action = _ACTION_INVALID;
- return telinit_parse_argv(argc, argv);
- } else {
- /* Hmm, so some other init system is running, we need to forward this request to it.
- */
- arg_action = ACTION_TELINIT;
- return 1;
- }
+ arg_action = _ACTION_INVALID; /* telinit_parse_argv() will figure out the actual action we'll execute */
+ return telinit_parse_argv(argc, argv);
} else if (invoked_as(argv, "runlevel")) {
arg_action = ACTION_RUNLEVEL;
r = runlevel_main();
break;
- case ACTION_TELINIT:
- r = exec_telinit(argv);
- break;
-
case ACTION_EXIT:
case ACTION_SLEEP:
case ACTION_SUSPEND:
ACTION_RELOAD,
ACTION_REEXEC,
ACTION_RUNLEVEL,
- ACTION_TELINIT,
ACTION_CANCEL_SHUTDOWN,
ACTION_SHOW_SHUTDOWN,
_ACTION_MAX,