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 -6
View File
@@ -62,18 +62,17 @@ void conf_parse_cmdline(void)
FILE *fp;
char line[LINE_SIZE];
if ((fp = fopen("/proc/cmdline", "r")) != NULL) {
fp = fopen("/proc/cmdline", "r");
if (fp) {
fgets(line, sizeof(line), fp);
_d("Kernel command line: %s", line);
if (strstr(line, "finit_debug") || strstr(line, "--debug"))
debug = 1;
#ifdef KERNEL_QUIET
if (!debug && strstr(line, "quiet"))
quiet = 1;
else
quiet = 0;
#endif
fclose(fp);
}
}
@@ -360,7 +359,7 @@ static int parse_conf(char *file)
strcat(line, " ");
}
if (verbose)
if (!silent)
print(0, "Loading %sconfiguration", line);
while (!feof(fp)) {
if (!fgets(line, sizeof(line), fp))