mirror of
https://github.com/troglobit/finit.git
synced 2026-10-20 11:19:35 +00:00
Add support for starting/stopping SysV init scripts
This patch adds initial support for starting a SysV init script in a
runlevel, and stopping it when leaving a runlevel.
sysv [LVLS] <COND> /path/to/script.sh -- Optional Description
The SysV /etc/inittab file, which may use /etc/init.d, or /etc/rcN.d,
is still not supported. A separate plugin would be required for this,
see the documentation for more information.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
9bfc9092b8
commit
fa0c63070c
6 files changed
+91
-12
No files matched your search
@@ -464,6 +464,12 @@ static void parse_dynamic(char *line, struct rlimit rlimit[], char *file)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Similar to task but is treated like a SysV init script */
|
||||
if (MATCH_CMD(line, "sysv ", x)) {
|
||||
service_register(SVC_TYPE_SYSV, x, rlimit, file);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Classic inetd service */
|
||||
if (MATCH_CMD(line, "inetd ", x)) {
|
||||
#ifdef INETD_ENABLED
|
||||
|
||||
Reference in new issue
Block a user