mirror of
https://github.com/troglobit/finit.git
synced 2026-11-13 17:00:16 +00:00
Add basic support for runlevels and bugfix FIFO I/O plugins
Like most other init implementations do, when entering runlevel 1, finit creates the file /etc/nologin to prevent users from logging in during single-user mode, this file is then removed upon leaving runlevel 1. Also, bugfix how FIFO I/O plugins are handled in finit. A FIFO will need to be reopened by the server side when the client closes the pipe. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
ec95243dad
commit
c3b76fdccf
7 files changed
+237
-57
No files matched your search
@@ -50,6 +50,7 @@ typedef enum {
|
||||
typedef struct svc {
|
||||
pid_t pid;
|
||||
int reload;
|
||||
int runlevels;
|
||||
unsigned int stat_restart_counter; /* Incremented for each restart by service monitor. */
|
||||
char cmd[MAX_ARG_LEN];
|
||||
char args[MAX_NUM_SVC_ARGS][MAX_ARG_LEN];
|
||||
@@ -87,6 +88,7 @@ static inline svc_t *finit_svc_connect(void)
|
||||
svc_t *svc_new (void);
|
||||
svc_t *svc_find (char *name);
|
||||
svc_t *svc_iterator (int restart);
|
||||
void svc_runlevel (int newlevel);
|
||||
|
||||
int svc_register (char *line, char *username);
|
||||
int svc_id_by_name (char *name);
|
||||
|
||||
Reference in new issue
Block a user