sysvinit-2.88-quiet.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. diff --git a/src/init.c b/src/init.c
  2. index d2bd121..dc82e28 100644
  3. --- a/src/init.c
  4. +++ b/src/init.c
  5. @@ -135,6 +135,7 @@ struct utmp utproto; /* Only used for sizeof(utproto.ut_id) */
  6. char *console_dev; /* Console device. */
  7. int pipe_fd = -1; /* /dev/initctl */
  8. int did_boot = 0; /* Did we already do BOOT* stuff? */
  9. +int quiet = 0; /* Should we be relatively silent? */
  10. int main(int, char **);
  11. /* Used by re-exec part */
  12. @@ -1800,7 +1801,7 @@ int read_level(int arg)
  13. initlog(L_SY, "Trying to re-exec init");
  14. return 'U';
  15. default:
  16. - initlog(L_VB, "Switching to runlevel: %c", foo);
  17. + if (!quiet) initlog(L_VB, "Switching to runlevel: %c", foo);
  18. }
  19. if (foo == 'Q') {
  20. @@ -2598,7 +2599,7 @@ void init_main(void)
  21. /*
  22. * Say hello to the world
  23. */
  24. - initlog(L_CO, bootmsg, "booting");
  25. + if (!quiet) initlog(L_CO, bootmsg, "booting");
  26. /*
  27. * See if we have to start an emergency shell.
  28. @@ -2859,6 +2860,8 @@ int main(int argc, char **argv)
  29. else if (!strcmp(argv[f], "-z")) {
  30. /* Ignore -z xxx */
  31. if (argv[f + 1]) f++;
  32. + } else if (!strcmp(argv[f], "quiet")) {
  33. + quiet = 1;
  34. } else if (strchr("0123456789sS", argv[f][0])
  35. && strlen(argv[f]) == 1)
  36. dfl_level = argv[f][0];