]> git.pld-linux.org Git - packages/SysVinit.git/blob - sysvinit-quiet.patch
- does not require logrotate; rel 19
[packages/SysVinit.git] / sysvinit-quiet.patch
1 --- sysvinit-2.86/src/init.c.silence    2006-08-08 20:50:37.000000000 -0400
2 +++ sysvinit-2.86/src/init.c    2006-08-08 20:54:24.000000000 -0400
3 @@ -117,6 +117,7 @@
4  char *console_dev;             /* Console device. */
5  int pipe_fd = -1;              /* /dev/initctl */
6  int did_boot = 0;              /* Did we already do BOOT* stuff? */
7 +int quiet = 0;                 /* Should we be relatively silent? */
8  int main(int, char **);
9  
10  /*     Used by re-exec part */
11 @@ -1673,7 +1674,7 @@
12                         initlog(L_SY, "Trying to re-exec init");
13                         return 'U';
14                 default:
15 -                       initlog(L_VB, "Switching to runlevel: %c", foo);
16 +                       if (!quiet) initlog(L_VB, "Switching to runlevel: %c", foo);
17         }
18  
19         if (foo == 'Q') return runlevel;
20 @@ -2425,7 +2426,7 @@
21         /*
22          *      Say hello to the world
23          */
24 -       initlog(L_CO, bootmsg, "booting");
25 +       if (!quiet) initlog(L_CO, bootmsg, "booting");
26  
27         /*
28          *      See if we have to start an emergency shell.
29 @@ -2657,6 +2658,8 @@
30                 else if (!strcmp(argv[f], "-z")) {
31                         /* Ignore -z xxx */
32                         if (argv[f + 1]) f++;
33 +               } else if (!strcmp(argv[f], "quiet")) {
34 +                       quiet = 1;
35                 } else if (strchr("0123456789sS", argv[f][0])
36                         && strlen(argv[f]) == 1)
37                         dfl_level = argv[f][0];
This page took 0.034725 seconds and 3 git commands to generate.