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

+2 -1
View File
@@ -42,6 +42,7 @@ typedef struct {
int debug = 0;
int verbose = 0;
int silent = 1; /* For helpers.c */
int runlevel = 0;
static int do_send(struct init_request *rq, ssize_t len)
@@ -349,7 +350,6 @@ int main(int argc, char *argv[])
{NULL, 0, NULL, 0}
};
verbose = 0;
while ((c = getopt_long(argc, argv, "dh?v", long_options, NULL)) != EOF) {
switch(c) {
case 'h':
@@ -365,6 +365,7 @@ int main(int argc, char *argv[])
break;
}
}
silent = !verbose;
if (optind < argc) {
char *cmd = argv[optind++];