diff --git a/src/init.c b/src/init.c index d2bd121..dc82e28 100644 --- a/src/init.c +++ b/src/init.c @@ -135,6 +135,7 @@ struct utmp utproto; /* Only used for sizeof(utproto.ut_id) */ char *console_dev; /* Console device. */ int pipe_fd = -1; /* /dev/initctl */ int did_boot = 0; /* Did we already do BOOT* stuff? */ +int quiet = 0; /* Should we be relatively silent? */ int main(int, char **); /* Used by re-exec part */ @@ -1800,7 +1801,7 @@ int read_level(int arg) initlog(L_SY, "Trying to re-exec init"); return 'U'; default: - initlog(L_VB, "Switching to runlevel: %c", foo); + if (!quiet) initlog(L_VB, "Switching to runlevel: %c", foo); } if (foo == 'Q') { @@ -2598,7 +2599,7 @@ void init_main(void) /* * Say hello to the world */ - initlog(L_CO, bootmsg, "booting"); + if (!quiet) initlog(L_CO, bootmsg, "booting"); /* * See if we have to start an emergency shell. @@ -2859,6 +2860,8 @@ int main(int argc, char **argv) else if (!strcmp(argv[f], "-z")) { /* Ignore -z xxx */ if (argv[f + 1]) f++; + } else if (!strcmp(argv[f], "quiet")) { + quiet = 1; } else if (strchr("0123456789sS", argv[f][0]) && strlen(argv[f]) == 1) dfl_level = argv[f][0];