Replace verbose and kernel quiet modes with silent and quiet

This patch replaces the verbose and kernel-quiet runtime options with
a (hopefully) more useful quiet and silent modes of operation.

By default Finit progressively shows all services it starts at boot, but
when boot has completed and services are started/restarted Finit prints
nothing.  If `--disable-quiet` is given all started/restared/stoppping
messages are shown even after boot.

However, if `--enable-silent` is given Finit is completely silent even
at boot, no progress is shown, until the first service is started, which
on most systems is login.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-04-11 00:50:37 +02:00
1 parent c4af8b7cbd
commit 1f1c2e0466
12 files changed
+43 -43

No files matched your search

+5 -5
View File
@@ -41,8 +41,8 @@
#include "inetd.h"
int debug = 0;
int quiet = KERNEL_QUIET; /* Delayed disable of verbose mode. */
int verbose = VERBOSE_MODE;
int quiet = QUIET_MODE; /* Delayed disable of silent mode. */
int silent = SILENT_MODE; /* Completely silent, including boot */
int runlevel = 0; /* Bootstrap 'S' */
int cfglevel = RUNLEVEL; /* Fallback if no configured runlevel */
int prevlevel = -1;
@@ -61,7 +61,7 @@ static int banner(void)
char buf[42] = INIT_HEADING;
const char separator[] = "========================================================================";
if (!verbose)
if (silent)
return 0;
fprintf(stderr, "\e[2K\e[1m%s %.*s\e[0m\n", buf, 66 - (int)strlen(buf), separator);
@@ -217,9 +217,9 @@ int main(int argc, char* argv[])
/* Start TTYs */
tty_runlevel(runlevel);
/* Disable verbose mode, if selected */
/* Enable silent mode, if selected */
if (quiet && !debug)
verbose = 0;
silent = 1;
/* Start new initctl API responder */
api_init(&loop);