mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 13:33:09 +07:00
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:
@@ -121,6 +121,10 @@ static void parse(void *UNUSED(arg), int fd, int UNUSED(events))
|
||||
debug = !debug;
|
||||
break;
|
||||
|
||||
case INIT_CMD_RELOAD:
|
||||
reload_finit_d();
|
||||
break;
|
||||
|
||||
case INIT_CMD_ACK:
|
||||
_d("Client failed reading ACK.");
|
||||
goto leave;
|
||||
|
||||
Reference in New Issue
Block a user