7c665371fc0d817f6ffa9244dcdc0eafd923ccc6
[busybox-power] / debian / patches / init-console.patch
1 From: Bastian Blank <waldi@debian.org>
2 Description: skip non-existing devices in inittab
3 Bug-Debian: http://bugs.debian.org/541115
4 Forwarded: no
5
6 This patch causes init silently skip running processes from inittab if
7 the terminal name is specified but the corresponding device file does not
8 exist.
9
10 --- a/init/init.c
11 +++ b/init/init.c
12 @@ -563,6 +563,8 @@ static void run_actions(int action_type)
13         for (a = init_action_list; a; a = a->next) {
14                 if (!(a->action_type & action_type))
15                         continue;
16 +               if (a->terminal[0] && access(a->terminal, R_OK | W_OK))
17 +                       continue;
18  
19                 if (a->action_type & (SYSINIT | WAIT | ONCE | CTRLALTDEL | SHUTDOWN)) {
20                         pid_t pid = run(a);