Refactor: Cleanup and expand client code to support <version|q|reload|debug>

Further refactoring of the client code.  Supported commands:

- debug:   Toggle PID 1 debug flag
- version: Show Finit version or custom header string
- reload:  Reload config files in /etc/finit.d/, same as SIGHUP

Also supported is the legacy 'init q' command, to reload config.

The 'status' command now supports an optiona '-v', either as an
argument to init itself, or as argument to the command.  When it
is given 'status' lists verbose information about all services.
Currently only the service arguments are listed.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-06-07 12:11:07 +02:00
1 parent 811bd75eab
commit 2026486fda
9 files changed
+233 -145

No files matched your search

+2
View File
@@ -95,6 +95,8 @@ int makepath (char *path);
void ifconfig (char *ifname, char *addr, char *mask, int up);
int atonum (char *str);
char *runlevel_string (int levels);
int banner (void);
pid_t pidfile_read (char *pidfile);
pid_t pidfile_poll (char *cmd, char *path);